diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/customisation.nix | 2 | ||||
-rw-r--r-- | lib/systems/examples.nix | 2 | ||||
-rw-r--r-- | lib/trivial.nix | 10 |
3 files changed, 12 insertions, 2 deletions
diff --git a/lib/customisation.nix b/lib/customisation.nix index df9d977e9ec7..68062dd0daf0 100644 --- a/lib/customisation.nix +++ b/lib/customisation.nix @@ -196,7 +196,7 @@ rec { newScope = scope: newScope (self // scope); callPackage = self.newScope {}; overrideScope = g: lib.warn - "`overrideScope` (from `lib.makeScope`) is deprecated. Do `overrideScope' (self: self: { … })` instead of `overrideScope (super: self: { … })`. All other overrides have the parameters in that order, including other definitions of `overrideScope`. This was the only definition violating the pattern." + "`overrideScope` (from `lib.makeScope`) is deprecated. Do `overrideScope' (self: super: { … })` instead of `overrideScope (super: self: { … })`. All other overrides have the parameters in that order, including other definitions of `overrideScope`. This was the only definition violating the pattern." (makeScope newScope (lib.fixedPoints.extends (lib.flip g) f)); overrideScope' = g: makeScope newScope (lib.fixedPoints.extends g f); packages = f; diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index c2ee829529dc..8ba03a63fd8d 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -28,7 +28,7 @@ rec { }; armv7l-hf-multiplatform = rec { - config = "armv7a-unknown-linux-gnueabihf"; + config = "armv7l-unknown-linux-gnueabihf"; platform = platforms.armv7l-hf-multiplatform; }; diff --git a/lib/trivial.nix b/lib/trivial.nix index b1eea0bf1247..938df6ced476 100644 --- a/lib/trivial.nix +++ b/lib/trivial.nix @@ -105,6 +105,16 @@ rec { then lib.strings.fileContents suffixFile else "pre-git"; + # Attempt to get the revision nixpkgs is from + revisionWithDefault = default: + let + revisionFile = "${toString ./..}/.git-revision"; + gitRepo = "${toString ./..}/.git"; + in if lib.pathIsDirectory gitRepo + then lib.commitIdFromGitRepo gitRepo + else if lib.pathExists revisionFile then lib.fileContents revisionFile + else default; + nixpkgsVersion = builtins.trace "`lib.nixpkgsVersion` is deprecated, use `lib.version` instead!" version; # Whether we're being called by nix-shell. |