summary refs log tree commit diff
path: root/pkgs/development/libraries/elementary-cmake-modules
diff options
context:
space:
mode:
authorSam Parkinson <sam@sam.today>2018-02-22 16:52:00 +1100
committerTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>2018-03-01 06:46:31 +0200
commitde650d4766b8d5740b41619ca3f33307dd3a0e34 (patch)
treec82077c3a0b52987974bc6f4c4fda36c58c06d8e /pkgs/development/libraries/elementary-cmake-modules
parent810318a622a3bd50d5756586bcd859cbfe13e724 (diff)
downloadnixpkgs-de650d4766b8d5740b41619ca3f33307dd3a0e34.tar
nixpkgs-de650d4766b8d5740b41619ca3f33307dd3a0e34.tar.gz
nixpkgs-de650d4766b8d5740b41619ca3f33307dd3a0e34.tar.bz2
nixpkgs-de650d4766b8d5740b41619ca3f33307dd3a0e34.tar.lz
nixpkgs-de650d4766b8d5740b41619ca3f33307dd3a0e34.tar.xz
nixpkgs-de650d4766b8d5740b41619ca3f33307dd3a0e34.tar.zst
nixpkgs-de650d4766b8d5740b41619ca3f33307dd3a0e34.zip
elementary-cmake-modules: init at 319ec5336...
Diffstat (limited to 'pkgs/development/libraries/elementary-cmake-modules')
-rw-r--r--pkgs/development/libraries/elementary-cmake-modules/default.nix28
-rw-r--r--pkgs/development/libraries/elementary-cmake-modules/setup-hook.sh4
2 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/development/libraries/elementary-cmake-modules/default.nix b/pkgs/development/libraries/elementary-cmake-modules/default.nix
new file mode 100644
index 00000000000..5287db75609
--- /dev/null
+++ b/pkgs/development/libraries/elementary-cmake-modules/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig }:
+
+stdenv.mkDerivation {
+  name = "elementary-cmake-modules";
+
+  src = fetchFromGitHub {
+    owner = "elementary";
+    repo = "cmake-modules";
+    rev = "319ec5336e9f05f3f22b886cc2053ef3d4b6599e";
+    sha256 = "191hhvdxyqvh9axzndaqld7vrmv7xkn0czks908zhb2zpjhv9rby";
+  };
+
+  prePatch = ''
+    substituteInPlace CMakeLists.txt  \
+      --replace ' ''${CMAKE_ROOT}/Modules' " $out/lib/cmake"
+  '';
+
+  propagatedBuildInputs = [ cmake pkgconfig ];
+
+  setupHook = ./setup-hook.sh;
+
+  meta = with lib; {
+    platforms = platforms.linux ++ platforms.darwin;
+    homepage = https://github.com/elementary/cmake-modules;
+    license = licenses.gpl3Plus;
+    maintainers = [ maintainers.samdroid-apps ];
+  };
+}
diff --git a/pkgs/development/libraries/elementary-cmake-modules/setup-hook.sh b/pkgs/development/libraries/elementary-cmake-modules/setup-hook.sh
new file mode 100644
index 00000000000..6408ac47157
--- /dev/null
+++ b/pkgs/development/libraries/elementary-cmake-modules/setup-hook.sh
@@ -0,0 +1,4 @@
+_elementaryCMakeEnvHook() {
+  cmakeFlagsArray+=(-DCMAKE_MODULE_PATH=@out@/lib/cmake)
+}
+addEnvHooks "$targetOffset" _elementaryCMakeEnvHook