package release script
This commit is contained in:
parent
993a0da9e7
commit
0fbc5c8d8d
2 changed files with 20 additions and 0 deletions
|
@ -21,5 +21,6 @@
|
||||||
./blog-pim.nix
|
./blog-pim.nix
|
||||||
./forgejo-nix-action.nix
|
./forgejo-nix-action.nix
|
||||||
./atticd.nix
|
./atticd.nix
|
||||||
|
./release.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
19
release.nix
Normal file
19
release.nix
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{ nixpkgs, flutils, ... }: flutils.lib.eachDefaultSystem (system:
|
||||||
|
let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
createScript = name: runtimeInputs: scriptPath:
|
||||||
|
let
|
||||||
|
script = (pkgs.writeScriptBin name (builtins.readFile scriptPath)).overrideAttrs (old: {
|
||||||
|
buildCommand = "${old.buildCommand}\n patchShebangs $out";
|
||||||
|
});
|
||||||
|
in
|
||||||
|
pkgs.symlinkJoin {
|
||||||
|
inherit name;
|
||||||
|
paths = [ script ] ++ runtimeInputs;
|
||||||
|
buildInputs = [ pkgs.makeWrapper ];
|
||||||
|
postBuild = "wrapProgram $out/bin/${name} --set PATH $out/bin";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
packages.release = createScript "release" (with pkgs; [ nix docker-client git ]) ./release.sh;
|
||||||
|
})
|
Reference in a new issue