Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build!(nix): reuse NixOS package #24

Merged
merged 2 commits into from
Oct 4, 2023

Conversation

mrcjkb
Copy link
Contributor

@mrcjkb mrcjkb commented Sep 29, 2023

I've added tuxedo-rs to NixOS/nixpkgs, and it is now available on the unstable branch.

This PR refactors the nix overlay to reuse the nixpkgs build, overriding the source, so that people who import this flake can use the latest scm version,

It also modifies the flake's module, so that it is in line with the NixOS module (we can delete this flake's module once NixOS 23.11 has been released).

Copy link
Owner

@AaronErhardt AaronErhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@AaronErhardt AaronErhardt merged commit b5ce233 into AaronErhardt:main Oct 4, 2023
4 checks passed
@mrcjkb mrcjkb deleted the nixpkgs-update branch October 5, 2023 08:48
@blitz
Copy link
Contributor

blitz commented Oct 9, 2023

This has unfortunately broken the module for 23.05 because the module still refers to services.tuxedo-rs.

@mrcjkb
Copy link
Contributor Author

mrcjkb commented Oct 9, 2023

This has unfortunately broken the module for 23.05 because the module still refers to services.tuxedo-rs.

The module in this flake now also uses hardware.tuxedo-rs, which is in line with the nixos-unstable module. There is no tuxedo-rs module in NixOS 23.05, so there's nothing to break. If you're using this flake, you can just update your NixOS configuration to use hardware.tuxedo-rs instead of services.tuxedo-rs. Or am I missing something?

@blitz
Copy link
Contributor

blitz commented Oct 10, 2023

This has unfortunately broken the module for 23.05 because the module still refers to services.tuxedo-rs.

The module in this flake now also uses hardware.tuxedo-rs, which is in line with the nixos-unstable module. There is no tuxedo-rs module in NixOS 23.05, so there's nothing to break. If you're using this flake, you can just update your NixOS configuration to use hardware.tuxedo-rs instead of services.tuxedo-rs. Or am I missing something?

As I said, module.nix still refers to services.tuxedo-rs:

error: attribute 'tuxedo-rs' missing

       at /nix/store/5whl7mdssfh79gkyizq1gy7gnwnnb3ad-source/nix/module.nix:9:9:

            8| with lib; let
            9|   cfg = config.services.tuxedo-rs;
             |         ^
           10| in {

This is easy to fix, but then the overlay is broken with NixOS 23.05 as well:

error: attribute 'tuxedo-rs' missing

       at /nix/store/rlj3pckxbn7b7mcxn50dqa1vfayflvp5-source/nix/overlay.nix:5:15:

            4|
            5|   tuxedo-rs = pkgs.tuxedo-rs.overrideAttrs (oa: {
             |               ^
            6|     src = self;

because it assumes that there is a tuxedo-rs in nixpkgs.

So in short, this currently doesn't work for NixOS 23.05. :(

My current workaround is to pin tuxedo-rs to a77a9f6.

@mrcjkb
Copy link
Contributor Author

mrcjkb commented Oct 10, 2023

@blitz it will be fixed with #25

@blitz
Copy link
Contributor

blitz commented Oct 10, 2023

That's really nice but it's only a partial fix. The packages still can't be referenced, because the overlay depends on nixpkgs-unstable as well.

@mrcjkb
Copy link
Contributor Author

mrcjkb commented Oct 10, 2023

That's really nice but it's only a partial fix. The packages still can't be referenced, because the overlay depends on nixpkgs-unstable as well.

Hmm, I guess this could be solved by passing the nixpkgs input to the overlay and using that to build the package (at least temporarily until NixOS 23.11 is released).

I'll look into it after work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants