mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2025-12-11 23:50:05 +01:00
hardcode nixpkgs in NIX_PATH of disko cli
This commit is contained in:
parent
50adcfe303
commit
0fadf13755
1 changed files with 5 additions and 1 deletions
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue