nixpkgs-suyu/pkgs/applications/misc/signumone-ks/default.nix

56 lines
1.5 KiB
Nix
Raw Normal View History

2021-01-15 06:42:41 +01:00
{ lib, stdenv, fetchurl, dpkg, autoPatchelfHook, makeWrapper,
2021-01-02 13:46:28 +01:00
atk, ffmpeg, gdk-pixbuf, glibc, gtk3, libav_0_8, libXtst }:
stdenv.mkDerivation rec {
pname = "signumone-ks";
2021-01-20 02:54:59 +01:00
version = "3.1.3";
2021-01-02 13:46:28 +01:00
src = fetchurl {
url = "https://cdn-dist.signum.one/${version}/${pname}-${version}.deb";
2021-01-20 02:54:59 +01:00
sha256 = "00wlya3kb6qac2crflm86km9r48r29bvngjq1wgzj9w2xv0q32b9";
2021-01-02 13:46:28 +01:00
};
# Necessary to avoid using multiple ffmpeg and gtk libs
autoPatchelfIgnoreMissingDeps = true;
nativeBuildInputs = [
autoPatchelfHook
dpkg
makeWrapper
];
buildInputs = [
atk glibc gdk-pixbuf stdenv.cc.cc ffmpeg
libav_0_8 gtk3 libXtst
];
2021-01-15 06:42:41 +01:00
libPath = lib.makeLibraryPath buildInputs;
2021-01-02 13:46:28 +01:00
unpackPhase = ''
dpkg-deb -x ${src} ./
'';
installPhase = ''
DESKTOP_PATH=$out/share/applications/signumone-ks.desktop
mkdir -p $out/bin $out/share/applications
mv opt/SignumOne-KS/SignumOne-KS.desktop $DESKTOP_PATH
mv opt $out
substituteInPlace $DESKTOP_PATH --replace 'Exec=/opt/SignumOne-KS' Exec=$out/bin
substituteInPlace $DESKTOP_PATH --replace 'Icon=' Icon=$out
makeWrapper $out/opt/SignumOne-KS/SignumOne-KS \
$out/bin/SignumOne-KS \
--prefix LD_LIBRARY_PATH : ${libPath}
'';
2021-01-15 06:42:41 +01:00
meta = with lib; {
2021-01-02 13:46:28 +01:00
description = "Digital signature tool for Costa Rican electronic invoicing";
homepage = "https://signum.one/download.html";
license = licenses.unfree;
maintainers = with maintainers; [ wolfangaukang ];
platforms = [ "x86_64-linux" ];
};
}