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

key: init at 2.6.3 #99761

Merged
merged 1 commit into from Nov 25, 2020
Merged

key: init at 2.6.3 #99761

merged 1 commit into from Nov 25, 2020

Conversation

fgaz
Copy link
Member

@fgaz fgaz commented Oct 6, 2020

Motivation for this change

Using this at uni. Looks established and maintained enough

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

, jre
, makeWrapper
, runCommand
, key
Copy link
Member Author

@fgaz fgaz Oct 6, 2020

Choose a reason for hiding this comment

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

Not sure if that's a good idea, but it gets the job done without a callPackage (which essentially does the same thing...)

Copy link
Member

Choose a reason for hiding this comment

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

The tricky bit is if you'd pkgs.key.override x and use it directly without inserting it into pkgs by means of an overlay, you'd have to do something like let key = pkgs.key.override (x // { inherit key; }; in key.

Instead, you could do

let gitRevision = # ...
    key = stdenv.mkDerivation rec {
      # ...
      passthru.tests.check-version = /* ... */;  # syntactically unchanged but uses the local binding
    }
in key

Copy link
Member Author

Choose a reason for hiding this comment

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

don't we basically have the same problem with all nixosTests?

Copy link
Member

@roberth roberth Nov 5, 2020

Choose a reason for hiding this comment

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

That's true. Doesn't mean this package can't do better, but I'll leave it up to you.

EDIT: tone :)

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 99761 run on x86_64-linux 1

1 package built:
  • key

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 99761 run on x86_64-darwin 1

1 package built:
  • key

@SuperSandro2000 SuperSandro2000 merged commit ea49bac into NixOS:master Nov 25, 2020
@fgaz fgaz deleted the key/init branch November 25, 2020 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants