mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-06 12:39:54 +03:00
commit
6077b9c13d
@ -4,29 +4,38 @@
|
||||
, fetchFromGitHub
|
||||
, bash
|
||||
, nix
|
||||
, coreutils
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
name = "disko";
|
||||
version = "1.3.0";
|
||||
version = "1.4.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "nix-community";
|
||||
repo = "disko";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-wOIJwAsnZhM0NlFRwYJRgO4Lldh8j9viyzwQXtrbNtM=";
|
||||
hash = "sha256-71S/64RbyADT6FUVJq4WLiNbmcxFvgMsSihf/C2Hgno=";
|
||||
};
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [ bash ];
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin $out/share/disko
|
||||
cp -r cli.nix default.nix disk-deactivate lib $out/share/disko
|
||||
sed -e "s|libexec_dir=\".*\"|libexec_dir=\"$out/share/disko\"|" disko > $out/bin/disko
|
||||
chmod 755 $out/bin/disko
|
||||
wrapProgram $out/bin/disko --prefix PATH : ${lib.makeBinPath [ nix ]}
|
||||
cp -r install-cli.nix cli.nix default.nix disk-deactivate lib $out/share/disko
|
||||
|
||||
for i in disko disko-install; do
|
||||
sed -e "s|libexec_dir=\".*\"|libexec_dir=\"$out/share/disko\"|" "$i" > "$out/bin/$i"
|
||||
chmod 755 "$out/bin/$i"
|
||||
wrapProgram "$out/bin/$i" --prefix PATH : ${lib.makeBinPath [ nix coreutils ]}
|
||||
done
|
||||
runHook postInstall
|
||||
'';
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
runHook preInstallCheck
|
||||
$out/bin/disko --help
|
||||
$out/bin/disko-install --help
|
||||
runHook postInstallCheck
|
||||
'';
|
||||
meta = {
|
||||
homepage = "https://github.com/nix-community/disko";
|
||||
|
Loading…
Reference in New Issue
Block a user