This repository has been archived on 2024-10-01. You can view files and clone it, but cannot push or open issues or pull requests.
container-images/release.nix

20 lines
660 B
Nix
Raw Normal View History

2024-04-26 22:26:02 +00:00
{ 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;
})