summary refs log tree commit diff
path: root/pkgs/applications/science/electronics/xcircuit/default.nix
blob: d10b486492e0b9d5c1b0b4e52bf50089f21d6f10 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ stdenv, fetchurl, autoreconfHook, automake, pkgconfig
, cairo, ghostscript, ngspice, tcl, tk, xorg, zlib }:

let
  version = "3.10.12";
  name = "xcircuit-${version}";
  inherit (stdenv.lib) getBin;

in stdenv.mkDerivation {
  inherit name version;

  src = fetchurl {
    url = "http://opencircuitdesign.com/xcircuit/archive/${name}.tgz";
    sha256 = "1h1ywc3mr7plvwnhdii2zgnnv5ih2nhyl4qbdjpi83dq0aq1s2mn";
  };

  nativeBuildInputs = [ autoreconfHook automake pkgconfig ];
  hardeningDisable = [ "format" ];

  configureFlags = [
    "--with-tcl=${tcl}/lib"
    "--with-tk=${tk}/lib"
    "--with-ngspice=${getBin ngspice}/bin/ngspice"
  ];

  buildInputs = with xorg; [ cairo ghostscript libSM libXt libICE libX11 libXpm tcl tk zlib ];

  meta = with stdenv.lib; {
    description = "Generic drawing program tailored to circuit diagrams";
    homepage = http://opencircuitdesign.com/xcircuit;
    license = licenses.gpl2;
    platforms = platforms.linux;
    maintainers = with maintainers; [ spacefrogg thoughtpolice ];
  };
}