flake-update-20260201
 1{
 2  lib,
 3  stdenv,
 4  makeWrapper,
 5  git,
 6  curl,
 7  coreutils,
 8  openssh,
 9}:
10
11stdenv.mkDerivation {
12  pname = "nixpkgs-consolidate";
13  version = "1.0.0";
14
15  src = ./.;
16
17  nativeBuildInputs = [ makeWrapper ];
18
19  dontUnpack = true;
20  dontBuild = true;
21
22  installPhase = ''
23    runHook preInstall
24
25    mkdir -p $out/bin
26    cp ${./nixpkgs-consolidate.sh} $out/bin/nixpkgs-consolidate
27    chmod +x $out/bin/nixpkgs-consolidate
28
29    # Patch shebang
30    patchShebangs $out/bin/nixpkgs-consolidate
31
32    # Wrap with runtime dependencies
33    wrapProgram $out/bin/nixpkgs-consolidate \
34      --prefix PATH : ${
35        lib.makeBinPath [
36          git
37          curl
38          coreutils
39          openssh
40        ]
41      }
42
43    runHook postInstall
44  '';
45
46  meta = with lib; {
47    description = "Consolidate multiple nixpkgs WIP branches into a single branch";
48    homepage = "https://github.com/vdemeester/home";
49    license = licenses.mit;
50    platforms = platforms.unix;
51    mainProgram = "nixpkgs-consolidate";
52  };
53}