Fix fixupPhase overwrite

This commit is contained in:
Benjamin Bädorf 2022-06-06 03:03:12 +02:00
parent e71abe255c
commit 41ee90351b
No known key found for this signature in database
GPG key ID: 4406E80E13CD656C
2 changed files with 16 additions and 16 deletions

View file

@ -7,7 +7,9 @@
outputs = { self, flake-utils, nixpkgs }:
flake-utils.lib.eachDefaultSystem (system:
let
triton-vmtools = import ./pkgs/triton-vmtools.nix { pkgs = import nixpkgs { inherit system; }; };
pkgs = import nixpkgs { inherit system; };
triton-vmtools = import ./pkgs/triton-vmtools.nix { inherit pkgs; };
in
{

View file

@ -23,7 +23,19 @@ stdenv.mkDerivation rec {
parted
];
fixupPhase = ''
patches = [
./0001-fix-paths-in-scripts.patch
];
installPhase = ''
sdcvmtools="src/linux"
mkdir -p $out/bin $out/lib $out/share/man/man1
cp -r ''${sdcvmtools}/lib/smartdc $out/lib/
cp -r ''${sdcvmtools}/usr/sbin/mdata-* $out/bin/
cp -r ''${sdcvmtools}/usr/share/man/man1/mdata-* $out/share/man/man1/
'';
preFixup = ''
for file in $out/lib/smartdc/*
do
substituteInPlace ''$file \
@ -36,20 +48,6 @@ stdenv.mkDerivation rec {
--replace "/usr/sbin/" "$out/bin/"
'';
patches = [
./0001-fix-paths-in-scripts.patch
];
installPhase = ''
echo "Installing SmartOS VM Guest Tools..."
sdcvmtools="src/linux"
mkdir -p $out/bin $out/lib $out/share/man/man1
cp -r ''${sdcvmtools}/lib/smartdc $out/lib/
cp -r ''${sdcvmtools}/usr/sbin/mdata-* $out/bin/
cp -r ''${sdcvmtools}/usr/share/man/man1/mdata-* $out/share/man/man1/
echo "SmartOS VM Guest Tools installed"
'';
meta = with lib; {
description = "The VM Guest tools contains scripts and drivers that are used to create virtualized machine images in SmartOS.";
homepage = "https://github.com/TritonDataCenter/sdc-vmtools";