Use nix and nix-index from nixpkgs instead of their own flakes

This commit is contained in:
Ilya K 2023-01-12 20:58:42 +03:00
parent 8656f3e07f
commit 1b0aa5e0d1
2 changed files with 12 additions and 114 deletions

View file

@ -1,85 +1,12 @@
{
"nodes": {
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1641205782,
"narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"lowdown-src": {
"flake": false,
"locked": {
"lastModified": 1633514407,
"narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=",
"owner": "kristapsdz",
"repo": "lowdown",
"rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8",
"type": "github"
},
"original": {
"owner": "kristapsdz",
"repo": "lowdown",
"type": "github"
}
},
"nix": {
"inputs": {
"lowdown-src": "lowdown-src",
"nixpkgs": "nixpkgs",
"nixpkgs-regression": "nixpkgs-regression"
},
"locked": {
"lastModified": 1673354285,
"narHash": "sha256-nSZH3ziwlMBe83pfAeMZWy6+URpEQISnZNmdO438dC8=",
"owner": "NixOS",
"repo": "nix",
"rev": "877e7a5ccf21279d9e027867e63181b2b9a6a15a",
"type": "github"
},
"original": {
"id": "nix",
"type": "indirect"
}
},
"nix-index": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": [
"nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1673358637,
"narHash": "sha256-UVKfgjnkU8U5+z96CiKUs1pnIFd3/2cJuvcQmWC0Hoo=",
"owner": "bennofs",
"repo": "nix-index",
"rev": "7ac935501a0f4ec094d15a35acf2bb35442259bb",
"type": "github"
},
"original": {
"owner": "bennofs",
"repo": "nix-index",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1670461440,
"narHash": "sha256-jy1LB8HOMKGJEGXgzFRLDU1CBGL0/LlkolgnqIsF0D8=",
"lastModified": 1673527292,
"narHash": "sha256-903EpRSDCfUvic7Hsiqwy+h7zlMTLAUbCXkEGGriCfM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "04a75b2eecc0acf6239acf9dd04485ff8d14f425",
"rev": "6a3f9996408c970b99b8b992b11bb249d1455b62",
"type": "github"
},
"original": {
@ -89,30 +16,9 @@
"type": "github"
}
},
"nixpkgs-regression": {
"locked": {
"lastModified": 1643052045,
"narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "github"
}
},
"root": {
"inputs": {
"nix": "nix",
"nix-index": "nix-index",
"nixpkgs": [
"nix",
"nixpkgs"
]
"nixpkgs": "nixpkgs"
}
}
},

View file

@ -1,22 +1,15 @@
{
description = "Script for generating Nixpkgs/NixOS channels";
inputs.nixpkgs.follows = "nix/nixpkgs";
inputs.nix-index = {
url = "github:bennofs/nix-index";
inputs.nixpkgs.follows = "nix/nixpkgs";
};
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11-small";
outputs = { self, nixpkgs, nix, nix-index }:
let nix-index' = nix-index.packages.x86_64-linux.nix-index; in
outputs = { self, nixpkgs }:
{
overlays.default = final: prev: {
nixos-channel-native-programs = with final; stdenv.mkDerivation {
name = "nixos-channel-native-programs";
buildInputs = [
final.nix
nix
pkgconfig
boehmgc
nlohmann_json
@ -38,8 +31,8 @@
nixos-channel-scripts = with final; stdenv.mkDerivation {
name = "nixos-channel-scripts";
buildInputs = with final.perlPackages;
[ final.nix
buildInputs = with perlPackages;
[ nix
sqlite
makeWrapper
perl
@ -52,7 +45,7 @@
brotli
jq
nixos-channel-native-programs
nix-index'
nix-index
];
buildCommand = ''
@ -61,7 +54,7 @@
cp ${./mirror-nixos-branch.pl} $out/bin/mirror-nixos-branch
wrapProgram $out/bin/mirror-nixos-branch \
--set PERL5LIB $PERL5LIB \
--prefix PATH : ${wget}/bin:${git}/bin:${final.nix}/bin:${gnutar}/bin:${xz}/bin:${rsync}/bin:${openssh}/bin:${nix-index'}/bin:${nixos-channel-native-programs}/bin:$out/bin
--prefix PATH : ${lib.makeBinPath [ wget git nix gnutar xz rsync openssh nix-index nixos-channel-native-programs ]}
patchShebangs $out/bin
'';
@ -71,8 +64,7 @@
defaultPackage.x86_64-linux = (import nixpkgs {
system = "x86_64-linux";
overlays = [ nix.overlays.default self.overlays.default ];
overlays = [ self.overlays.default ];
}).nixos-channel-scripts;
};
}