-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
43918eb
commit d4a3502
Showing
5 changed files
with
227 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
build/ | ||
out/ | ||
build | ||
out | ||
result | ||
*.o | ||
*.core | ||
ui_*.h | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ lib | ||
, stdenv | ||
, cmake | ||
, git | ||
, qtbase | ||
, wrapQtAppsHook | ||
, texlive | ||
, lato | ||
, withDoc ? true | ||
}: | ||
|
||
stdenv.mkDerivation { | ||
pname = "qucsrflayout"; | ||
version = "2.0.0"; | ||
|
||
src = ./.; | ||
|
||
nativeBuildInputs = [ | ||
cmake | ||
git | ||
wrapQtAppsHook | ||
] ++ lib.optionals withDoc [ | ||
lato | ||
(texlive.combine { | ||
inherit (texlive) scheme-small standalone pgfplots; | ||
}) | ||
]; | ||
|
||
buildInputs = [ | ||
qtbase | ||
]; | ||
|
||
cmakeFlags = [ | ||
"-DCPM_DISABLE=ON" | ||
]; | ||
|
||
postBuild = lib.optionals withDoc '' | ||
export XDG_CACHE_HOME=$TMPDIR | ||
make doc | ||
''; | ||
|
||
enableParallelBuilding = true; | ||
|
||
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"; | ||
} | ||
]; | ||
}; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{ | ||
description = "Export Qucs RF schematics to KiCad layouts & OpenEMS scripts"; | ||
|
||
nixConfig.bash-prompt-suffix = "(qucsrflayout) "; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs"; | ||
|
||
flake-utils.url = "github:numtide/flake-utils"; | ||
|
||
nixGL = { | ||
url = "github:nix-community/nixGL"; | ||
inputs.nixpkgs.follows = "nixpkgs"; | ||
inputs.flake-utils.follows = "flake-utils"; | ||
}; | ||
}; | ||
|
||
outputs = { self | ||
, nixpkgs | ||
, flake-utils | ||
, nixGL | ||
, ... | ||
}@args: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
pkgs = nixpkgs.legacyPackages.${system}; | ||
|
||
nixGLWrapper = package: pkgs.stdenvNoCC.mkDerivation { | ||
inherit (package) pname version meta; | ||
doCheck = false; | ||
dontUnpack = true; | ||
dontBuild = true; | ||
installPhase = | ||
let | ||
script = '' | ||
exec ${nixGL.packages.${system}.nixGLDefault}/bin/nixGL ${package}/bin/${package.pname} "$@" | ||
''; | ||
in '' | ||
mkdir -p $out/bin | ||
printf '${script}' > $out/bin/${package.pname} | ||
chmod +x $out/bin/${package.pname} | ||
mkdir -p $out/share | ||
${pkgs.xorg.lndir}/bin/lndir -silent ${package}/share $out/share | ||
''; | ||
}; | ||
|
||
this-package = pkgs.libsForQt5.callPackage ./default.nix {}; | ||
|
||
in { | ||
packages = rec { | ||
default = qucsrflayoutNixGL; | ||
qucsrflayout = this-package; | ||
qucsrflayoutNixGL = nixGLWrapper this-package; | ||
}; | ||
|
||
devShells = { | ||
default = pkgs.mkShell { | ||
inputsFrom = [ | ||
this-package | ||
]; | ||
}; | ||
|
||
nixGL = pkgs.mkShell { | ||
inputsFrom = [ | ||
this-package | ||
]; | ||
packages = [ | ||
nixGL.packages.${system}.nixGLDefault | ||
]; | ||
}; | ||
}; | ||
}); | ||
} |