Skip to content

Add nixpkgs-unstable #1025

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

Merged
merged 9 commits into from
Feb 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions builder/comp-builder.nix
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ let
preBuild postBuild
preInstall postInstall;
}
// lib.optionalAttrs (hardeningDisable != []) {
inherit hardeningDisable;
// lib.optionalAttrs (hardeningDisable != [] || stdenv.hostPlatform.isMusl) {
hardeningDisable = hardeningDisable ++ lib.optional stdenv.hostPlatform.isMusl "pie";
});
in drv; in self)
4 changes: 4 additions & 0 deletions ci.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
nixpkgsVersions = {
"R2003" = "nixpkgs-2003";
"R2009" = "nixpkgs-2009";
"unstable" = "nixpkgs-unstable";
};
compilerNixNames = nixpkgsName: nixpkgs: builtins.mapAttrs (compiler-nix-name: runTests: {
inherit (import ./default.nix { inherit checkMaterialization; }) nixpkgsArgs;
Expand All @@ -30,6 +31,9 @@
ghc8102 = false;
ghc8103 = true;
ghc810220201118 = false;
} // nixpkgs.lib.optionalAttrs (nixpkgsName == "unstable") {
ghc884 = true;
ghc8103 = true;
});
systems = nixpkgs: nixpkgs.lib.filterAttrs (_: v: builtins.elem v supportedSystems) {
# I wanted to take these from 'lib.systems.examples', but apparently there isn't one for linux!
Expand Down
1 change: 1 addition & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@
allOverlays = import ./overlays args;
nixpkgsArgs = { inherit config overlays system; };
pkgs = import sources.nixpkgs nixpkgsArgs;
pkgs-unstable = import sources.nixpkgs-unstable nixpkgsArgs;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure this should still be here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I mainly use pkgs for debugging haskell.nix issues, by running things like:

nix-build -E '(import ./. {}).pkgs.haskell-nix.tool "ghc8103" "hello" "latest"'

I wanted to be able to continue to do this now I have upgraded to BigSur.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually, now that I look at this, it's a bit weird that pkgs is there too. I get that these are useful for debugging... but surely our users shouldn't be using these attributes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I wonder if we should rename them debug and debug-unstable to make that clear.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Or add debug.nix with attributes useful for debugging? The problem is the dual duty of default.nix as the place for all useful attributes and also our de-facto external interface.

}
12 changes: 12 additions & 0 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,17 @@
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/f02bf8ffb9a5ec5e8f6f66f1e5544fd2aa1a0693.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs-unstable": {
"branch": "nixpkgs-unstable",
"description": "Nix Packages collection",
"homepage": "",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "410bbd828cdc6156aecd5bc91772ad3a6b1099c7",
"sha256": "0idvgvpgnzvk03yvd77lrca9qib936fq2x690jvk5gk3blsckz3r",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/410bbd828cdc6156aecd5bc91772ad3a6b1099c7.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}