forked from nix-community/disko
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move disko-install into disko package
- Loading branch information
1 parent
a2009bc
commit 72818e5
Showing
4 changed files
with
19 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,29 @@ | ||
{ stdenvNoCC, makeWrapper, lib, path }: | ||
{ stdenvNoCC, makeWrapper, lib, path, nix, coreutils }: | ||
|
||
stdenvNoCC.mkDerivation rec { | ||
stdenvNoCC.mkDerivation (finalAttrs: { | ||
name = "disko"; | ||
src = ./.; | ||
nativeBuildInputs = [ | ||
makeWrapper | ||
]; | ||
installPhase = '' | ||
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\"|" \ | ||
-e "s|#!/usr/bin/env.*|#!/usr/bin/env bash|" \ | ||
disko > $out/bin/disko | ||
chmod 755 $out/bin/disko | ||
wrapProgram $out/bin/disko --prefix NIX_PATH : "nixpkgs=${path}" | ||
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 ]} \ | ||
--prefix NIX_PATH : "nixpkgs=${path}" | ||
done | ||
''; | ||
meta = with lib; { | ||
description = "Format disks with nix-config"; | ||
homepage = "https://github.com/nix-community/disko"; | ||
license = licenses.mit; | ||
maintainers = with maintainers; [ lassulus ]; | ||
platforms = platforms.linux; | ||
mainProgram = finalAttrs.name; | ||
}; | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters