mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2025-12-12 08:00:05 +01:00
use stdenvNoCC instead of barebone derivation
This commit is contained in:
parent
9e2c9d06f5
commit
17d17217d8
1 changed files with 17 additions and 17 deletions
34
package.nix
34
package.nix
|
|
@ -1,4 +1,4 @@
|
||||||
{ coreutils, gnused, lib }:
|
{ stdenvNoCC, lib }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inclFiles = {src, name}: files: lib.cleanSourceWith {
|
inclFiles = {src, name}: files: lib.cleanSourceWith {
|
||||||
|
|
@ -6,13 +6,16 @@ let
|
||||||
filter = _path: _type: _type == "regular" && lib.any (file: builtins.baseNameOf _path == file) files;
|
filter = _path: _type: _type == "regular" && lib.any (file: builtins.baseNameOf _path == file) files;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
derivation rec {
|
stdenvNoCC.mkDerivation rec {
|
||||||
system = "x86_64-linux";
|
|
||||||
name = "disko";
|
name = "disko";
|
||||||
builder = "/bin/sh";
|
src = inclFiles { inherit name; src = ./.; } [
|
||||||
PATH = "${coreutils}/bin:${gnused}/bin";
|
"disko"
|
||||||
passAsFile = ["buildPhase"];
|
"cli.nix"
|
||||||
buildPhase = ''
|
"default.nix"
|
||||||
|
"types.nix"
|
||||||
|
"options.nix"
|
||||||
|
];
|
||||||
|
installPhase = ''
|
||||||
mkdir -p $out/bin $out/share/disko
|
mkdir -p $out/bin $out/share/disko
|
||||||
cp -r $src/* $out/share/disko
|
cp -r $src/* $out/share/disko
|
||||||
sed \
|
sed \
|
||||||
|
|
@ -21,14 +24,11 @@ derivation rec {
|
||||||
$src/disko > $out/bin/disko
|
$src/disko > $out/bin/disko
|
||||||
chmod 755 $out/bin/disko
|
chmod 755 $out/bin/disko
|
||||||
'';
|
'';
|
||||||
args = ["-c" ". $buildPhasePath"];
|
meta = with lib; {
|
||||||
src = inclFiles { inherit name; src = ./.; } [
|
description = "Format disks with nix-config";
|
||||||
"disko"
|
homepage = "https://github.com/nix-community/disko";
|
||||||
"cli.nix"
|
license = licenses.mit;
|
||||||
"default.nix"
|
maintainers = with maintainers; [ lassulus ];
|
||||||
"types.nix"
|
platforms = platforms.linux;
|
||||||
"options.nix"
|
};
|
||||||
];
|
|
||||||
} // {
|
|
||||||
meta.description = "Format disks with nix-config";
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue