feat(npins): use fetchgit lock patches

This commit is contained in:
catvayor 2025-05-17 11:43:10 +02:00
parent a31fe38f88
commit 8c48f6c9d0
Signed by: lbailly
GPG key ID: CE3E645251AC63F3
4 changed files with 28 additions and 21 deletions

View file

@ -22,13 +22,19 @@ let
unspecified
;
patched_lix = pkgs.applyPatches {
src = sources.lix;
name = "lix-patched";
patches = [ "${sources.dgnum-infra}/patches/lix/02-fetchGit-locked.patch" ];
};
default_overlay_paths = [
"${sources.kat-pkgs}/overlay.nix"
(pkgs.writeText "lix-overlay.nix" ''
import "${sources.lix-overlay}/overlay.nix" {
lix = {
rev = "${sources.lix.version}";
__toString = self: ${sources.lix};
__toString = self: ${patched_lix};
};
}
'')

View file

@ -82,7 +82,7 @@ let
if url != null && !submodules then
builtins.fetchTarball {
inherit url;
sha256 = hash; # FIXME: check nix version & use SRI hashes
sha256 = hash;
}
else
let
@ -109,9 +109,9 @@ let
in
builtins.fetchGit {
rev = revision;
inherit name;
# hash = hash;
inherit url submodules;
narHash = hash;
inherit name submodules url;
};
mkPyPiSource =
@ -140,7 +140,7 @@ let
sha256 = hash;
};
in
if version == 5 then
if version == 6 then
builtins.mapAttrs mkSource data.pins
else
throw "Unsupported format version ${toString version} in sources.json. Try running `npins upgrade`"

View file

@ -10,7 +10,7 @@
"submodules": false,
"revision": "8fb86e8fa84c4f42bf61f91408134eef19e4bca7",
"url": null,
"hash": "1fdw1rm4ks3hbjx5p5fk53ss9lyl3fdhgk58s5qn69xy33ans1r9"
"hash": "sha256-KQdt1Ri+J2Nx0ajMB5sb1NOk9SjTlVu6XHDoSWoOvLk="
},
"disko": {
"type": "GitRelease",
@ -26,7 +26,7 @@
"version": "v1.12.0",
"revision": "7121f74b976481bc36877abaf52adab2a178fcbe",
"url": "https://api.github.com/repos/nix-community/disko/tarball/v1.12.0",
"hash": "0wbx518d2x54yn4xh98cgm65wvj0gpy6nia6ra7ns4j63hx14fkq"
"hash": "sha256-eDoSOhxGEm2PykZFa/x9QG5eTH0MJdiJ9aR00VAofXE="
},
"home-manager-stable": {
"type": "Git",
@ -39,7 +39,7 @@
"submodules": false,
"revision": "b4bbdc6fde16fc2051fcde232f6e288cd22007ca",
"url": "https://github.com/nix-community/home-manager/archive/b4bbdc6fde16fc2051fcde232f6e288cd22007ca.tar.gz",
"hash": "1vf41h2362jk6qxih57wx779i1sqmd98j49cw5z6mhxs429apzhg"
"hash": "sha256-D/6rkiC6w2p+4SwRiVKrWIeYzun8FBg7NlMKMwQMxO0="
},
"home-manager-unstable": {
"type": "Git",
@ -52,7 +52,7 @@
"submodules": false,
"revision": "535a541b429c1e89f0955c160df1d6d2bfeaf802",
"url": "https://github.com/nix-community/home-manager/archive/535a541b429c1e89f0955c160df1d6d2bfeaf802.tar.gz",
"hash": "04pkpr5b9ajvhfkq8mmrwdw037yamhblj6jzhiscl069kic53rwq"
"hash": "sha256-mOdRWJzJAMp0hF8aSResyp8BeOO5VoSng1uqtEq+8xI="
},
"kat-pkgs": {
"type": "Git",
@ -64,7 +64,7 @@
"submodules": false,
"revision": "2df4e901590ebd139364d1df140a6ccb2cd0a5a7",
"url": null,
"hash": "19hhprlmh23gwjx8m5fss96qigd93g4z6b1apbkj7yimkc2ld2jv"
"hash": "sha256-W4pGBZs1+iPnuios88kbqb2ITdLalYq65G8IWGm+EKY="
},
"lix": {
"type": "GitRelease",
@ -79,7 +79,7 @@
"version": "2.93.0",
"revision": "47aad376c87e2e65967f17099277428e4b3f8e5a",
"url": null,
"hash": "0g17i8yz5j0i2v29c2fddksvnc5n8fc5ml2pz0jhxaia7ghmxhc6"
"hash": "sha256-hsFe4Tsqqg4l+FfQWphDtjC79WzNCZbEFhHI8j2KJzw="
},
"lix-overlay": {
"type": "GitRelease",
@ -94,7 +94,7 @@
"version": "2.93.0",
"revision": "cd2a9c028df820a83ca2807dc6c6e7abc3dfa7fc",
"url": null,
"hash": "1pz4j93rwgf3hv3za3q16300kp9b74aglb1mbr5qpiw0g0mphm6p"
"hash": "sha256-11R4K3iAx4tLXjUs+hQ5K90JwDABD/XHhsM9nkeS5N8="
},
"nixos-images": {
"type": "Git",
@ -107,7 +107,7 @@
"submodules": false,
"revision": "90e49170397bf963d1977a816dbb8a01a9e26d34",
"url": "https://github.com/nix-community/nixos-images/archive/90e49170397bf963d1977a816dbb8a01a9e26d34.tar.gz",
"hash": "106lgy2iawq3xz22cd9r577k62dh2zyv40ss16lxzdn4b4i4fa2s"
"hash": "sha256-WihHIlnEtt+pCVoDsv0XsAkzzyk5NSbE7wNzFYV/1IA="
},
"nixos-mailserver": {
"type": "Git",
@ -120,19 +120,19 @@
"submodules": false,
"revision": "da66510f688b7eac54e3cac7c75be4b8dd78ce8b",
"url": "https://gitlab.com/api/v4/projects/simple-nixos-mailserver%2Fnixos-mailserver/repository/archive.tar.gz?sha=da66510f688b7eac54e3cac7c75be4b8dd78ce8b",
"hash": "0imxmdbx8z0hn0yvgrhazs0qx788a92w8hgysr1vlqfxwd4qc3gf"
"hash": "sha256-7g2GSePdYbpD1v5BxEVSCJ2Ogf4K5rc9sBB81FervUY="
},
"nixpkgs-stable": {
"type": "Channel",
"name": "nixos-24.11",
"url": "https://releases.nixos.org/nixos/24.11/nixos-24.11.717837.a39ed32a651f/nixexprs.tar.xz",
"hash": "0b373ivlgynwbj0707510v5fvf80n0m39waxxn5izkb97y7m03h4"
"hash": "sha256-BA5Qjz9pzR+L7V3xNCqwALntygahHHCAXNz6R3ccZyw="
},
"nixpkgs-unstable": {
"type": "Channel",
"name": "nixpkgs-unstable",
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.05pre798761.eaeed9530c76/nixexprs.tar.xz",
"hash": "1k7j5zk62nx7zwdfcxslxkrsny81xydg6874xdg1i4272fmg8szy"
"hash": "sha256-/mv0qhNHkBhe6+Qg85rvAXmr8+xUd+Ya/6dbYeYv8sw="
},
"nixvim-stable": {
"type": "Git",
@ -145,7 +145,7 @@
"submodules": false,
"revision": "5bef8e43ce16ee704c7b9fa9f48a07ce81c5c05d",
"url": "https://github.com/nix-community/nixvim/archive/5bef8e43ce16ee704c7b9fa9f48a07ce81c5c05d.tar.gz",
"hash": "09ygfa5pz0aqfgh7jirqkqx5xxngjh3b6m09470njx7m3y7yb4ij"
"hash": "sha256-MpLljx/1dGnBIQlUswaUz/ZeOp44R3ngc1iBf4tyzyc="
},
"nixvim-unstable": {
"type": "Git",
@ -158,8 +158,8 @@
"submodules": false,
"revision": "ff0ccdf572ad6700a2a29a82cc5d17db29708988",
"url": "https://github.com/nix-community/nixvim/archive/ff0ccdf572ad6700a2a29a82cc5d17db29708988.tar.gz",
"hash": "12c5pdi1wp2jcbhn2k7qn1bl6dn70xabgigklb9p5m4pn88hbkxg"
"hash": "sha256-r88FEbKX1HLTovPFt1QHxzZDV7D4TGHhYlJcHmK7hYk="
}
},
"version": 5
"version": 6
}

View file

@ -1,13 +1,14 @@
let
sources = import ./npins;
hive = import ./hive.nix;
dgnum-bootstrap = import "${sources.dgnum-infra}/bootstrap.nix";
pkgs = import sources.nixpkgs-unstable {
overlays = hive.meta.nodeSpecialArgs.kat-probook.meta.general_overlays;
};
in
pkgs.mkShell {
packages = with pkgs; [
npins
(pkgs.callPackage "${dgnum-bootstrap.sources.npins}/npins.nix" { })
colmena
];
}