14 { src, toolName, version, ... } @ attrs:
16 wrapBinary = libPaths: binaryName: ''
17 wrapProgram "$out/bin/${binaryName}" \
18 --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath libPaths}"
20 pkg = stdenv.mkDerivation (rec {
21 inherit (attrs) version src;
23 name = "${toolName}-${version}";
26 homepage = "http://bitscope.com/software/";
27 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
28 license = licenses.unfree;
29 platforms = [ "x86_64-linux" ];
30 maintainers = with maintainers; [
33 } // (attrs.meta or {});
35 nativeBuildInputs = [ makeWrapper dpkg ];
37 libs = attrs.libs or [
49 unpackPhase = attrs.unpackPhase or ''
50 dpkg-deb -x ${attrs.src} ./
53 installPhase = attrs.installPhase or ''
56 ${(wrapBinary libs) attrs.toolName}
60 name = "${attrs.toolName}-${attrs.version}";
61 runScript = "${pkg.outPath}/bin/${attrs.toolName}";
62 } // { inherit (pkg) meta name; }