aboutsummaryrefslogtreecommitdiff
path: root/.config/nixpkgs/packages
diff options
context:
space:
mode:
authortdro <tdro@users.noreply.github.com>2022-10-25 21:04:38 -0400
committertdro <tdro@users.noreply.github.com>2022-10-26 07:39:28 -0400
commitaf9d8dcba4e11f2f26f233535a86790319658660 (patch)
treea32404849e291b2d4ef0fa2d47cbee9c857c9cfc /.config/nixpkgs/packages
parent67caa1c8f8fd8942fd1493477ede48cf19b02b93 (diff)
downloaddotfiles-af9d8dcba4e11f2f26f233535a86790319658660.tar.gz
dotfiles-af9d8dcba4e11f2f26f233535a86790319658660.tar.bz2
dotfiles-af9d8dcba4e11f2f26f233535a86790319658660.zip
.config/nixpkgs/packages: Add standalone nixpkgs library
Diffstat (limited to '.config/nixpkgs/packages')
-rw-r--r--.config/nixpkgs/packages/nixpkgs.lib/default.nix61
1 files changed, 61 insertions, 0 deletions
diff --git a/.config/nixpkgs/packages/nixpkgs.lib/default.nix b/.config/nixpkgs/packages/nixpkgs.lib/default.nix
new file mode 100644
index 0000000..953c613
--- /dev/null
+++ b/.config/nixpkgs/packages/nixpkgs.lib/default.nix
@@ -0,0 +1,61 @@
+{ lib, pkgs, stdenv, fetchgit }:
+
+stdenv.mkDerivation rec {
+
+ pname = "nixpkgs.lib";
+ version = "f9d58ee370835f4c658cd0a62e8def4bda8b1f32";
+
+ src = fetchgit {
+ url = "https://github.com/nix-community/nixpkgs.lib.git";
+ sha256 = "sha256-KnumcE6UuNQPapsr32KjcRVDVuRGWB5PnAczHoo9nJc=";
+ rev = version;
+ };
+
+ installPhase = ''
+ runHook preInstall
+ mkdir --parents $out
+ cp --recursive --no-target-directory $src $out
+ runHook postInstall
+ '';
+
+ patches = [
+ (pkgs.writeTextFile {
+ name = "remove-nonexistent-external-calls.patch";
+ text = ''
+ diff --git a/lib/default.nix b/lib/default.nix
+ index 0c0e2d5..76b99fe 100644
+ --- a/lib/default.nix
+ +++ b/lib/default.nix
+ @@ -24,8 +24,8 @@ let
+ # packaging
+ customisation = callLibs ./customisation.nix;
+ derivations = callLibs ./derivations.nix;
+ - maintainers = import ../maintainers/maintainer-list.nix;
+ - teams = callLibs ../maintainers/team-list.nix;
+ + maintainers = { };
+ + teams = { };
+ meta = callLibs ./meta.nix;
+ sources = callLibs ./sources.nix;
+ versions = callLibs ./versions.nix;
+ diff --git a/lib/trivial.nix b/lib/trivial.nix
+ index 5d4fad8..d679563 100644
+ --- a/lib/trivial.nix
+ +++ b/lib/trivial.nix
+ @@ -164,7 +164,7 @@ rec {
+ version = release + versionSuffix;
+
+ /* Returns the current nixpkgs release number as string. */
+ - release = lib.strings.fileContents ../.version;
+ + release = "";
+
+ /* The latest release that is supported, at the time of release branch-off,
+ if applicable.
+ '';
+ })
+ ];
+
+ meta = with lib; {
+ description = "nixpkgs lib for cheap instantiation ";
+ homepage = "https://github.com/nix-community/nixpkgs.lib";
+ };
+}