summary refs log tree commit diff
path: root/pkgs/development/python-modules/extractcode
diff options
context:
space:
mode:
authorCole Helbling <cole.e.helbling@outlook.com>2021-04-19 22:33:08 -0700
committerCole Helbling <cole.e.helbling@outlook.com>2021-04-23 09:10:59 -0700
commitedfa1203608d820f79097b280855abbe70fa18fd (patch)
tree9153daac9c108f69fb1c309f6ae848c6336c2cb0 /pkgs/development/python-modules/extractcode
parent157f3eae602f91b497fb0b28e1889cf7729c8edf (diff)
downloadnixpkgs-edfa1203608d820f79097b280855abbe70fa18fd.tar
nixpkgs-edfa1203608d820f79097b280855abbe70fa18fd.tar.gz
nixpkgs-edfa1203608d820f79097b280855abbe70fa18fd.tar.bz2
nixpkgs-edfa1203608d820f79097b280855abbe70fa18fd.tar.lz
nixpkgs-edfa1203608d820f79097b280855abbe70fa18fd.tar.xz
nixpkgs-edfa1203608d820f79097b280855abbe70fa18fd.tar.zst
nixpkgs-edfa1203608d820f79097b280855abbe70fa18fd.zip
python3.pkgs.extractcode-7z: init at 21.4.4
Diffstat (limited to 'pkgs/development/python-modules/extractcode')
-rw-r--r--pkgs/development/python-modules/extractcode/7z.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/extractcode/7z.nix b/pkgs/development/python-modules/extractcode/7z.nix
new file mode 100644
index 00000000000..e3318b426ec
--- /dev/null
+++ b/pkgs/development/python-modules/extractcode/7z.nix
@@ -0,0 +1,48 @@
+{ lib
+, fetchFromGitHub
+, buildPythonPackage
+, plugincode
+, p7zip
+}:
+buildPythonPackage rec {
+  pname = "extractcode-7z";
+  version = "21.4.4";
+
+  src = fetchFromGitHub {
+    owner = "nexB";
+    repo = "scancode-plugins";
+    rev = "v${version}";
+    sha256 = "xnUGDMS34iMVMGo/nZwRarGzzbj3X4Rt+YHvvKpmy6A=";
+  };
+
+  sourceRoot = "source/builtins/extractcode_7z-linux";
+
+  propagatedBuildInputs = [
+    plugincode
+  ];
+
+  preBuild = ''
+    pushd src/extractcode_7z/bin
+
+    rm 7z 7z.so
+    ln -s ${p7zip}/bin/7z 7z
+    ln -s ${p7zip}/lib/p7zip/7z.so 7z.so
+
+    popd
+  '';
+
+  # no tests
+  doCheck = false;
+
+  pythonImportsCheck = [
+    "extractcode_7z"
+  ];
+
+  meta = with lib; {
+    description = "A ScanCode Toolkit plugin to provide pre-built binary libraries and utilities and their locations";
+    homepage = "https://github.com/nexB/scancode-plugins/tree/main/builtins/extractcode_7z-linux";
+    license = with licenses; [ asl20 lgpl21 ];
+    maintainers = teams.determinatesystems.members;
+    platforms = platforms.linux;
+  };
+}