veracrypt: refactorings
- Conditionally add wxGTK30 to inputs to avoid eval'ing it regardless of wxGUI - Patch full path to exe into desktop file - Move some inputs to native - Do not write intermediate tar file on unpack
This commit is contained in:
parent
2ae74f9f4f
commit
2c81510a1a
@ -2,6 +2,8 @@
|
|||||||
wxGUI ? true
|
wxGUI ? true
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "veracrypt-${version}";
|
name = "veracrypt-${version}";
|
||||||
version = "1.19";
|
version = "1.19";
|
||||||
@ -11,18 +13,17 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "111xs1zmic82lpn5spn0ca33q0g4za04a2k4cvjwdb7k3vcicq6v";
|
sha256 = "111xs1zmic82lpn5spn0ca33q0g4za04a2k4cvjwdb7k3vcicq6v";
|
||||||
};
|
};
|
||||||
|
|
||||||
# The source archive can't be extracted with "tar xfz"; I don't know why
|
# The source archive appears to be compressed twice ...
|
||||||
# Using "gunzip" before "tar xf" works though
|
|
||||||
unpackPhase =
|
unpackPhase =
|
||||||
''
|
''
|
||||||
gunzip -c $src > src.tar
|
gzip -dc $src | tar xz
|
||||||
tar xf src.tar
|
|
||||||
cd Vera*/src
|
cd Vera*/src
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ makeself nasm pkgconfig ];
|
||||||
buildInputs = [ fuse devicemapper wxGTK30 nasm makeself ];
|
buildInputs = [ fuse devicemapper ]
|
||||||
makeFlags = if wxGUI then "" else "NOGUI=1";
|
++ optional wxGUI wxGTK30;
|
||||||
|
makeFlags = optionalString (!wxGUI) "NOGUI=1";
|
||||||
|
|
||||||
installPhase =
|
installPhase =
|
||||||
''
|
''
|
||||||
@ -31,14 +32,14 @@ stdenv.mkDerivation rec {
|
|||||||
mkdir -p $out/share/$name
|
mkdir -p $out/share/$name
|
||||||
cp License.txt $out/share/$name/LICENSE
|
cp License.txt $out/share/$name/LICENSE
|
||||||
mkdir -p $out/share/applications
|
mkdir -p $out/share/applications
|
||||||
sed 's/\/usr\/bin\/veracrypt/veracrypt/' Setup/Linux/veracrypt.desktop > $out/share/applications/veracrypt.desktop
|
sed "s,Exec=.*,Exec=$out/bin/veracrypt," Setup/Linux/veracrypt.desktop > $out/share/applications/veracrypt.desktop
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Free Open-Source filesystem on-the-fly encryption";
|
description = "Free Open-Source filesystem on-the-fly encryption";
|
||||||
homepage = https://veracrypt.codeplex.com/;
|
homepage = https://veracrypt.codeplex.com/;
|
||||||
license = "VeraCrypt License";
|
license = "VeraCrypt License";
|
||||||
maintainers = with stdenv.lib.maintainers; [dsferruzza];
|
maintainers = with maintainers; [ dsferruzza ];
|
||||||
platforms = stdenv.lib.platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user