summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorfreezeboy <freezeboy@users.noreply.github.com>2020-07-10 18:57:10 +0200
committerfreezeboy <freezeboy@users.noreply.github.com>2020-08-19 20:45:33 +0200
commit0e0ad1a7a223ea9355e288f7d68f8370f13a4b50 (patch)
treecb8cb402a5c6f5d267cc7bf8e7e609e975d9fcfb /pkgs/development
parent28224516e5cfce2782fc8bbc700ca814d4648cb7 (diff)
downloadnixpkgs-0e0ad1a7a223ea9355e288f7d68f8370f13a4b50.tar
nixpkgs-0e0ad1a7a223ea9355e288f7d68f8370f13a4b50.tar.gz
nixpkgs-0e0ad1a7a223ea9355e288f7d68f8370f13a4b50.tar.bz2
nixpkgs-0e0ad1a7a223ea9355e288f7d68f8370f13a4b50.tar.lz
nixpkgs-0e0ad1a7a223ea9355e288f7d68f8370f13a4b50.tar.xz
nixpkgs-0e0ad1a7a223ea9355e288f7d68f8370f13a4b50.tar.zst
nixpkgs-0e0ad1a7a223ea9355e288f7d68f8370f13a4b50.zip
snap7: init at 1.4.2
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/libraries/snap7/default.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/development/libraries/snap7/default.nix b/pkgs/development/libraries/snap7/default.nix
new file mode 100644
index 00000000000..3419c4c6c2a
--- /dev/null
+++ b/pkgs/development/libraries/snap7/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, lib, fetchFromGitHub, fetchzip, p7zip }:
+
+stdenv.mkDerivation rec {
+  pname = "snap7";
+  version = "1.4.2";
+
+  src = fetchzip {
+    url = "mirror://sourceforge/snap7/${version}/snap7-full-${version}.7z";
+    sha256 = "1n5gs8bwb6g9vfllf3x12r5yzqzapmlq1bmc6hl854b8vkg30y8c";
+    postFetch = ''
+      ${p7zip}/bin/7z x $downloadedFile
+      mkdir $out
+      cp -r snap7-full-${version}/* $out/
+    '';
+  };
+
+  outputs = [ "out" "dev" "doc" ];
+
+  makefile = "x86_64_linux.mk";
+  makeFlags = [ "LibInstall=$(out)/lib" ];
+
+  preBuild = "cd build/unix";
+  preInstall = ''
+    mkdir -p $out/lib
+    mkdir -p $dev/include
+    mkdir -p $doc/share
+    cp $src/examples/cpp/snap7.h $dev/include
+    cp -r $src/doc $doc/share/
+  '';
+
+  meta = with lib; {
+    homepage = "http://snap7.sourceforge.net/";
+    description = "Step7 Open Source Ethernet Communication Suite";
+    license = licenses.lgpl3;
+    maintainers = with maintainers; [ freezeboy ];
+    platforms = platforms.linux;
+  };
+}