about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorGuilhem Saurel <guilhem.saurel@laas.fr>2024-03-26 00:42:45 +0100
committerSandro Jäckel <sandro.jaeckel@gmail.com>2024-04-20 17:15:27 +0200
commite71d969ca7d0c66e1fb5a4122f13cbbb680f9bf6 (patch)
treec5dcfa14fd46d6b6cdbdf4c99b12466eadfc4eec /pkgs
parentdf69ac58f030234a251edebe35efa625282a7dd0 (diff)
structuresynth: init at 1.5.1
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/structuresynth/default.nix61
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 63 insertions, 0 deletions
diff --git a/pkgs/development/libraries/structuresynth/default.nix b/pkgs/development/libraries/structuresynth/default.nix
new file mode 100644
index 0000000000000..362aaa7e25c95
--- /dev/null
+++ b/pkgs/development/libraries/structuresynth/default.nix
@@ -0,0 +1,61 @@
+{
+  lib,
+  stdenv,
+  fetchFromGitHub,
+  fetchpatch,
+  cmake,
+  qtbase,
+  wrapQtAppsHook,
+  libGL,
+  libGLU,
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "structuresynth";
+  version = "1.5.1";
+
+  src = fetchFromGitHub {
+    owner = "alemuntoni";
+    repo = "structuresynth";
+    rev = finalAttrs.version;
+    hash = "sha256-uFz4WPwA586B/5p+DUJ/W8KzbHLBhLIwP6mySZJ1vPY=";
+  };
+
+  patches = [
+    # This PR in 2 commits allow packaging of this project as standalone.
+    # It was merged upstream, so those 2 patches can be removed on next release.
+    (fetchpatch {
+      name = "shared-lib.patch";
+      url = "https://github.com/alemuntoni/StructureSynth/pull/1/commits/fdb87c55a03c6a0faa4335de5d29f0fb547b6102.patch";
+      hash = "sha256-/66x8HGyNhGwoxsbV+QIRFYQNuFSHYXNYkJzAn4jyJI=";
+    })
+    (fetchpatch {
+      name = "install-project.patch";
+      url = "https://github.com/alemuntoni/StructureSynth/pull/1/commits/f96a90f6a4c60e9e0316edd20ea77674a2b764a7.patch";
+      hash = "sha256-cSZAL1N2/Gd0x+9UkTUQxqVlb2m2MM8AA1Zzlo6S35w=";
+    })
+  ];
+
+  outputs = [
+    "dev"
+    "out"
+  ];
+
+  buildInputs = [
+    libGL
+    libGLU
+    qtbase
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    wrapQtAppsHook
+  ];
+
+  meta = with lib; {
+    description = "Generate 3D structures by specifying a design grammar";
+    homepage = "https://github.com/alemuntoni/StructureSynth";
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ nim65s ];
+  };
+})
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 445e320dec986..1afabb98dbc44 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -24723,6 +24723,8 @@ with pkgs;
   streamlink = callPackage ../applications/video/streamlink { };
   streamlink-twitch-gui-bin = callPackage ../applications/video/streamlink-twitch-gui/bin.nix { };
 
+  structuresynth = libsForQt5.callPackage ../development/libraries/structuresynth { };
+
   sub-batch = callPackage ../applications/video/sub-batch { };
 
   subdl = callPackage ../applications/video/subdl { };