mirror of
https://github.com/nix-community/disko.git
synced 2026-11-30 13:03:28 +01:00
hardcode nixpkgs in NIX_PATH of disko cli
This commit is contained in:
1 parent
50adcfe303
commit
0fadf13755
1 file changed
+5
-1
+5
-1
@@ -1,8 +1,11 @@
|
||||
{ stdenvNoCC, lib }:
|
||||
{ stdenvNoCC, makeWrapper, lib, path }:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
name = "disko";
|
||||
src = ./.;
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
];
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/share/disko
|
||||
cp -r cli.nix default.nix types.nix disk-deactivate types $out/share/disko
|
||||
@@ -11,6 +14,7 @@ stdenvNoCC.mkDerivation rec {
|
||||
-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}"
|
||||
'';
|
||||
meta = with lib; {
|
||||
description = "Format disks with nix-config";
|
||||
|
||||
Reference in new issue
Block a user