btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / al / alliance / package.nix
blobf4333be8475e8adae1eab6fbee81444bb5d7a52e
1 { lib, stdenv, fetchFromGitLab, xorgproto, motif, libX11, libXt, libXpm, bison
2 , flex, automake, autoconf, libtool
3 }:
5 stdenv.mkDerivation rec {
6   pname = "alliance";
7   version = "unstable-2022-01-13";
9   src = fetchFromGitLab {
10     domain = "gitlab.lip6.fr";
11     owner = "vlsi-eda";
12     repo = "alliance";
13     rev = "ebece102e15c110fc79f1da50524c68fd9523f0c";
14     hash = "sha256-NGtE3ZmN9LrgXG4NIKrp7dFRVzrKMoudlPUtYYKrZjY=";
15   };
17   prePatch = "cd alliance/src";
19   nativeBuildInputs = [ libtool automake autoconf flex ];
20   buildInputs = [ xorgproto motif libX11 libXt libXpm bison ];
22   # Disable parallel build, errors:
23   #  ./pat_decl_y.y:736:5: error: expected '=', ...
24   enableParallelBuilding = false;
26   ALLIANCE_TOP = placeholder "out";
28   configureFlags = [
29     "--prefix=${placeholder "out"}" "--enable-alc-shared"
30   ];
32   postPatch = ''
33     # texlive for docs seems extreme
34     substituteInPlace autostuff \
35       --replace "$newdirs documentation" "$newdirs"
37     substituteInPlace sea/src/DEF_grammar_lex.l --replace "ifndef FLEX_BETA" \
38       "if (YY_FLEX_MAJOR_VERSION <= 2) && (YY_FLEX_MINOR_VERSION < 6)"
40     ./autostuff
41   '';
43   postInstall = ''
44     sed -i "s|ALLIANCE_TOP|$out|" distrib/*.desktop
45     mkdir -p $out/share/applications
46     cp -p distrib/*.desktop $out/share/applications/
47     mkdir -p $out/icons/hicolor/48x48/apps/
48     cp -p distrib/*.png $out/icons/hicolor/48x48/apps/
49   '';
51   meta = with lib; {
52     description = "(deprecated) Complete set of free CAD tools and portable libraries for VLSI design";
53     homepage = "http://coriolis.lip6.fr/";
54     license = with licenses; gpl2Plus;
55     maintainers = with maintainers; [ l-as ];
56     platforms = with platforms; linux;
57   };