/
default.nix
70 lines (61 loc) · 1.28 KB
/
default.nix
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{ lib
, stdenv
, cmake
, qtbase
, wrapQtAppsHook
, texlive
, lato
, withDoc ? true
}:
stdenv.mkDerivation {
pname = "qucsrflayout";
version = "2.0.0";
src = lib.nix-filter {
root = ./.;
include = [
"cmake"
"src"
"doc"
"lib"
"pack"
"test"
"CMakeLists.txt"
"CHANGELOG"
];
};
nativeBuildInputs = [
cmake
wrapQtAppsHook
] ++ lib.optionals withDoc [
lato
(texlive.combine {
inherit (texlive) scheme-small standalone pgfplots;
})
];
buildInputs = [
qtbase
];
postBuild = lib.optionals withDoc ''
export XDG_CACHE_HOME=$TMPDIR
make doc
'';
postInstall = lib.optionals stdenv.hostPlatform.isWindows ''
mkdir -p $out/bin/platforms
ln -t $out/bin/platforms -s ${qtbase}/lib/qt-6/plugins/platforms/qwindows.dll
'';
dontWrapQtApps = stdenv.hostPlatform.isWindows;
QT_XCB_GL_INTEGRATION = "none";
meta = {
homepage = "https://github.com/thomaslepoix/Qucs-RFlayout";
description = "Export Qucs RF schematics to KiCad layouts & OpenEMS scripts";
license = lib.licenses.gpl3;
maintainers = [
{
email = "thomas.lepoix@protonmail.ch";
github = "thomaslepoix";
githubId = 26417323;
name = "Thomas Lepoix";
}
];
};
}