forked from mirrors/nixpkgs
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
51 lines
1.6 KiB
Nix
51 lines
1.6 KiB
Nix
{ lib, stdenv, fetchgit, cmake, pkgconfig, zlib, libpng, cairo, freetype
|
|
, json_c, fontconfig, gtkmm3, pangomm, glew, libGLU, xorg, pcre
|
|
, wrapGAppsHook
|
|
}:
|
|
stdenv.mkDerivation rec {
|
|
name = "solvespace-2.3-20190501";
|
|
rev = "e7b75f19c34c923780db776592b47152650d8f22";
|
|
src = fetchgit {
|
|
url = "https://github.com/solvespace/solvespace";
|
|
inherit rev;
|
|
sha256 = "07k4mbzxf0dmzwdhjx5nc09y7rn1schkaypsw9kz0l7ppylprpp2";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
pkgconfig cmake wrapGAppsHook
|
|
];
|
|
buildInputs = [
|
|
zlib libpng cairo freetype
|
|
json_c fontconfig gtkmm3 pangomm glew libGLU
|
|
xorg.libpthreadstubs xorg.libXdmcp pcre
|
|
];
|
|
|
|
preConfigure = ''
|
|
patch CMakeLists.txt <<EOF
|
|
@@ -20,9 +20,9 @@
|
|
# NOTE TO PACKAGERS: The embedded git commit hash is critical for rapid bug triage when the builds
|
|
# can come from a variety of sources. If you are mirroring the sources or otherwise build when
|
|
# the .git directory is not present, please comment the following line:
|
|
-include(GetGitCommitHash)
|
|
+# include(GetGitCommitHash)
|
|
# and instead uncomment the following, adding the complete git hash of the checkout you are using:
|
|
-# set(GIT_COMMIT_HASH 0000000000000000000000000000000000000000)
|
|
+set(GIT_COMMIT_HASH $rev)
|
|
EOF
|
|
'';
|
|
|
|
postInstall = ''
|
|
substituteInPlace $out/share/applications/solvespace.desktop \
|
|
--replace /usr/bin/ $out/bin/
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A parametric 3d CAD program";
|
|
license = licenses.gpl3;
|
|
maintainers = [ maintainers.edef ];
|
|
platforms = platforms.linux;
|
|
homepage = "http://solvespace.com";
|
|
};
|
|
}
|