(fix): nix flake
This commit is contained in:
parent
040d60a35f
commit
3049e090be
1 changed files with 9 additions and 13 deletions
22
flake.nix
22
flake.nix
|
|
@ -13,8 +13,7 @@
|
||||||
packages = forAllSystems (system: let
|
packages = forAllSystems (system: let
|
||||||
pkgs = import nixpkgs {inherit system;};
|
pkgs = import nixpkgs {inherit system;};
|
||||||
debArtifact = "Tensamin-${version}-linux-amd64.deb";
|
debArtifact = "Tensamin-${version}-linux-amd64.deb";
|
||||||
localDebPath = builtins.getEnv "TENSAMIN_DEB";
|
|
||||||
debPath = /. + localDebPath;
|
|
||||||
electronRuntimeLibs = with pkgs; [
|
electronRuntimeLibs = with pkgs; [
|
||||||
alsa-lib
|
alsa-lib
|
||||||
at-spi2-atk
|
at-spi2-atk
|
||||||
|
|
@ -55,9 +54,8 @@
|
||||||
packageDeb = src:
|
packageDeb = src:
|
||||||
pkgs.stdenv.mkDerivation {
|
pkgs.stdenv.mkDerivation {
|
||||||
pname = "tensamin";
|
pname = "tensamin";
|
||||||
inherit version;
|
inherit version src;
|
||||||
|
|
||||||
inherit src;
|
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
autoPatchelfHook
|
autoPatchelfHook
|
||||||
dpkg
|
dpkg
|
||||||
|
|
@ -70,21 +68,21 @@
|
||||||
|
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
runHook preUnpack
|
runHook preUnpack
|
||||||
dpkg-deb -x $src .
|
dpkg-deb -x "$src" .
|
||||||
runHook postUnpack
|
runHook postUnpack
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p $out
|
mkdir -p "$out"
|
||||||
cp -r opt $out/
|
cp -r opt "$out/"
|
||||||
cp -r usr/* $out/
|
cp -r usr/* "$out/"
|
||||||
|
|
||||||
mkdir -p $out/bin
|
mkdir -p "$out/bin"
|
||||||
makeWrapper $out/opt/Tensamin/tensamin $out/bin/tensamin
|
makeWrapper "$out/opt/Tensamin/tensamin" "$out/bin/tensamin"
|
||||||
|
|
||||||
substituteInPlace $out/share/applications/tensamin.desktop \
|
substituteInPlace "$out/share/applications/tensamin.desktop" \
|
||||||
--replace-fail "Exec=/opt/Tensamin/tensamin" "Exec=tensamin"
|
--replace-fail "Exec=/opt/Tensamin/tensamin" "Exec=tensamin"
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
|
|
@ -96,8 +94,6 @@
|
||||||
});
|
});
|
||||||
in {
|
in {
|
||||||
default = defaultPackage;
|
default = defaultPackage;
|
||||||
|
|
||||||
localPathForDev = if localDebPath == "" then defaultPackage else packageDeb debPath;
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue