From f203414b019f95af5b4a9391f1f9962a937e60c0 Mon Sep 17 00:00:00 2001 From: Naoki Pross Date: Sun, 24 Oct 2021 15:45:03 +0200 Subject: Create nix overlay for gnuradio --- src/dearpygui.nix | 37 ------------------------------------- src/nix/dearpygui.nix | 37 +++++++++++++++++++++++++++++++++++++ src/nix/gnuradio-overlay.nix | 8 ++++++++ src/shell.nix | 4 ++-- 4 files changed, 47 insertions(+), 39 deletions(-) delete mode 100644 src/dearpygui.nix create mode 100644 src/nix/dearpygui.nix create mode 100644 src/nix/gnuradio-overlay.nix (limited to 'src') diff --git a/src/dearpygui.nix b/src/dearpygui.nix deleted file mode 100644 index 1b26eaf..0000000 --- a/src/dearpygui.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ lib, pkgs, buildPythonPackage, fetchPypi, isPy38, autoPatchelfHook }: - -assert isPy38; - -buildPythonPackage rec { - pname = "dearpygui"; - version = "1.0.2"; - format = "wheel"; - - # src = fetchFromGitHub { - # owner = "hoffstadt"; - # repo = "DearPyGui"; - # rev = "v${version}"; - # sha256 = "094s1r1jjgj6512dp5z5gn50m5g5b7qg6c2wgxhjsn38mxivpd2h"; - # fetchSubmodules = true; - # }; - - src = fetchPypi { - inherit pname version format; - python = "cp38"; - abi = "cp38"; - platform = "manylinux1_x86_64"; - sha256 = "10y8a3v135pziknnrzg8x5q5l6p7jvxgva8r8l5vjhdq9p5mxnab"; - }; - - # dontUseCmakeConfigure = false; - # nativeBuildInputs = with pkgs; [ cmake ]; - nativeBuildInputs = [ autoPatchelfHook ]; - - buildInputs = (with pkgs; [ - libGL libGL_driver - ]) ++ (with pkgs.xorg; [ - libX11 libXrandr libXinerama libXcursor libXi - ]); - - meta = with lib; {}; -} diff --git a/src/nix/dearpygui.nix b/src/nix/dearpygui.nix new file mode 100644 index 0000000..1b26eaf --- /dev/null +++ b/src/nix/dearpygui.nix @@ -0,0 +1,37 @@ +{ lib, pkgs, buildPythonPackage, fetchPypi, isPy38, autoPatchelfHook }: + +assert isPy38; + +buildPythonPackage rec { + pname = "dearpygui"; + version = "1.0.2"; + format = "wheel"; + + # src = fetchFromGitHub { + # owner = "hoffstadt"; + # repo = "DearPyGui"; + # rev = "v${version}"; + # sha256 = "094s1r1jjgj6512dp5z5gn50m5g5b7qg6c2wgxhjsn38mxivpd2h"; + # fetchSubmodules = true; + # }; + + src = fetchPypi { + inherit pname version format; + python = "cp38"; + abi = "cp38"; + platform = "manylinux1_x86_64"; + sha256 = "10y8a3v135pziknnrzg8x5q5l6p7jvxgva8r8l5vjhdq9p5mxnab"; + }; + + # dontUseCmakeConfigure = false; + # nativeBuildInputs = with pkgs; [ cmake ]; + nativeBuildInputs = [ autoPatchelfHook ]; + + buildInputs = (with pkgs; [ + libGL libGL_driver + ]) ++ (with pkgs.xorg; [ + libX11 libXrandr libXinerama libXcursor libXi + ]); + + meta = with lib; {}; +} diff --git a/src/nix/gnuradio-overlay.nix b/src/nix/gnuradio-overlay.nix new file mode 100644 index 0000000..48145b8 --- /dev/null +++ b/src/nix/gnuradio-overlay.nix @@ -0,0 +1,8 @@ +self: super: { + gnuradio = super.gnuradio.override { + extraPythonPackages = super.lib.attrVals [ + "setuptools" + # Add more python packages here if you need any. + ] super.gnuradio.unwrapped.python.pkgs; + }; +} diff --git a/src/shell.nix b/src/shell.nix index edb49a5..b6351e8 100644 --- a/src/shell.nix +++ b/src/shell.nix @@ -1,7 +1,7 @@ # vim: set ts=2 sw=2 et: -with import {}; +with import { overlays = [ (import ./nix/gnuradio-overlay.nix) ]; }; let - dearpygui = callPackage ./dearpygui.nix { + dearpygui = callPackage ./nix/dearpygui.nix { buildPythonPackage = pkgs.python38Packages.buildPythonPackage; fetchPypi = pkgs.python38Packages.fetchPypi; isPy38 = pkgs.python38Packages.isPy38; -- cgit v1.2.1