pinact: 1.0.0 -> 1.1.2 and set CGO_ENABLED=0 (#368078)
[NixPkgs.git] / pkgs / applications / science / electronics / degate / default.nix
blob5e328890d48d2aefb9f7341e350705f588d64790
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   fetchpatch,
6   cmake,
7   boost,
8   qtbase,
9   qtimageformats,
10   qttools,
11   wrapQtAppsHook,
14 let
15   boost_static = boost.override { enableStatic = true; };
18 stdenv.mkDerivation rec {
19   pname = "degate";
20   version = "2.0.0";
22   src = fetchFromGitHub {
23     owner = "DegateCommunity";
24     repo = "Degate";
25     tag = "v${version}";
26     hash = "sha256-INoA3Z6ya03ZMn6E+nOCkXZLoxoo2WgPDw9v5miI09A=";
27   };
29   patches = [
30     # bump bundled catch2 to avoid incompatibility with modern glibc
31     (fetchpatch {
32       name = "catch2-2.13.9.patch";
33       url = "https://github.com/DegateCommunity/Degate/commit/06346dde4312cbb867854899eacf58679d6ac7e2.patch";
34       includes = [ "tests/catch2/catch.hpp" ];
35       hash = "sha256-SbSA813QI8RRVy1lvAOGMGAC2KUQKjwYR2imqX40pvU=";
36     })
37   ];
39   postPatch = ''
40     sed -i -E '/(_OUTPUT_DIRECTORY|DESTINATION)/s|\bout/||g' CMakeLists.txt
41   '';
43   nativeBuildInputs = [
44     cmake
45     qttools
46     wrapQtAppsHook
47   ];
49   buildInputs = [
50     boost_static
51     qtbase
52   ];
54   doCheck = true;
55   checkPhase = ''
56     runHook preCheck
58     (
59       cd tests/out/bin
61       # provide qtimageformats plugin to allow tests to read tiff files
62       export QT_PLUGIN_PATH="${qtimageformats}/${qtbase.qtPluginPrefix}"
64       ./DegateTests
65     )
67     runHook postCheck
68   '';
70   meta = with lib; {
71     description = "Modern and open-source cross-platform software for chips reverse engineering";
72     mainProgram = "Degate";
73     homepage = "https://degate.readthedocs.io/";
74     license = licenses.gpl3;
75     platforms = platforms.unix;
76     maintainers = with maintainers; [ ris ];
77   };