disko/package.nix
2023-02-02 14:42:09 +01:00

23 lines
662 B
Nix

{ stdenvNoCC, lib }:
stdenvNoCC.mkDerivation rec {
name = "disko";
src = ./.;
installPhase = ''
mkdir -p $out/bin $out/share/disko
cp -r cli.nix default.nix types.nix disk-deactivate types $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
'';
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;
};
}