Merge pull request #126110 from IvarWithoutBones/init/gwe
commit
c2d2360d14
|
@ -0,0 +1,23 @@
|
||||||
|
{ lib, buildPythonPackage, fetchPypi, typing-extensions }:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "injector";
|
||||||
|
version = "0.18.4";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "10miwi58g4b8rvdf1pl7s7x9j91qyxxv3kdn5idzkfc387hqxn6f";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ typing-extensions ];
|
||||||
|
|
||||||
|
doCheck = false; # No tests are available
|
||||||
|
pythonImportsCheck = [ "injector" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Python dependency injection framework, inspired by Guice";
|
||||||
|
homepage = "https://github.com/alecthomas/injector";
|
||||||
|
maintainers = [ maintainers.ivar ];
|
||||||
|
license = licenses.bsd3;
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,89 @@
|
||||||
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchFromGitLab
|
||||||
|
, wrapGAppsHook
|
||||||
|
, makeWrapper
|
||||||
|
, pkg-config
|
||||||
|
, meson
|
||||||
|
, ninja
|
||||||
|
, cmake
|
||||||
|
, gobject-introspection
|
||||||
|
, desktop-file-utils
|
||||||
|
, python3
|
||||||
|
, gtk3
|
||||||
|
, libdazzle
|
||||||
|
, libappindicator-gtk3
|
||||||
|
, libnotify
|
||||||
|
, nvidia_x11
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
pythonEnv = python3.withPackages (pypkgs: with pypkgs; [
|
||||||
|
injector
|
||||||
|
matplotlib
|
||||||
|
peewee
|
||||||
|
pynvml
|
||||||
|
pygobject3
|
||||||
|
xlib
|
||||||
|
pyxdg
|
||||||
|
requests
|
||||||
|
rx
|
||||||
|
gtk3
|
||||||
|
]);
|
||||||
|
in stdenv.mkDerivation rec {
|
||||||
|
pname = "gwe";
|
||||||
|
version = "0.15.3";
|
||||||
|
|
||||||
|
src = fetchFromGitLab {
|
||||||
|
owner = "leinardi";
|
||||||
|
repo = pname;
|
||||||
|
rev = version;
|
||||||
|
sha256 = "1znd2g02j0klg8w6cgwvaxc8anan6sidadknl0vh9jxmzz75xp9z";
|
||||||
|
};
|
||||||
|
|
||||||
|
prePatch = ''
|
||||||
|
patchShebangs scripts/{make_local_manifest,meson_post_install}.py
|
||||||
|
|
||||||
|
substituteInPlace gwe/repository/nvidia_repository.py \
|
||||||
|
--replace "from py3nvml import py3nvml" "import pynvml" \
|
||||||
|
--replace "py3nvml.py3nvml" "pynvml" \
|
||||||
|
--replace "py3nvml" "pynvml"
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
wrapGAppsHook
|
||||||
|
pkg-config
|
||||||
|
meson
|
||||||
|
ninja
|
||||||
|
cmake
|
||||||
|
gobject-introspection
|
||||||
|
desktop-file-utils
|
||||||
|
pythonEnv
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
gtk3
|
||||||
|
libdazzle
|
||||||
|
libappindicator-gtk3
|
||||||
|
libnotify
|
||||||
|
];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mv $out/bin/gwe $out/lib/gwe-bin
|
||||||
|
|
||||||
|
makeWrapper ${pythonEnv}/bin/python $out/bin/gwe \
|
||||||
|
--add-flags "$out/lib/gwe-bin" \
|
||||||
|
--prefix LD_LIBRARY_PATH : "/run/opengl-driver/lib" \
|
||||||
|
--prefix PATH : "${builtins.concatStringsSep ":" [ (lib.makeBinPath [ nvidia_x11 nvidia_x11.settings ]) "/run/wrappers/bin" ]}" \
|
||||||
|
--unset "SHELL" \
|
||||||
|
''${gappsWrapperArgs[@]}
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "System utility designed to provide information, control the fans and overclock your NVIDIA card";
|
||||||
|
homepage = "https://gitlab.com/leinardi/gwe";
|
||||||
|
platforms = platforms.linux;
|
||||||
|
license = licenses.gpl3Only;
|
||||||
|
maintainers = [ maintainers.ivar ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -11153,6 +11153,10 @@ in
|
||||||
|
|
||||||
gprolog = callPackage ../development/compilers/gprolog { };
|
gprolog = callPackage ../development/compilers/gprolog { };
|
||||||
|
|
||||||
|
gwe = callPackage ../tools/misc/gwe {
|
||||||
|
nvidia_x11 = linuxPackages.nvidia_x11;
|
||||||
|
};
|
||||||
|
|
||||||
gwt240 = callPackage ../development/compilers/gwt/2.4.0.nix { };
|
gwt240 = callPackage ../development/compilers/gwt/2.4.0.nix { };
|
||||||
|
|
||||||
idrisPackages = dontRecurseIntoAttrs (callPackage ../development/idris-modules {
|
idrisPackages = dontRecurseIntoAttrs (callPackage ../development/idris-modules {
|
||||||
|
|
|
@ -3400,6 +3400,8 @@ in {
|
||||||
|
|
||||||
iniparse = callPackage ../development/python-modules/iniparse { };
|
iniparse = callPackage ../development/python-modules/iniparse { };
|
||||||
|
|
||||||
|
injector = callPackage ../development/python-modules/injector { };
|
||||||
|
|
||||||
inotify-simple = callPackage ../development/python-modules/inotify-simple { };
|
inotify-simple = callPackage ../development/python-modules/inotify-simple { };
|
||||||
|
|
||||||
inquirer = callPackage ../development/python-modules/inquirer { };
|
inquirer = callPackage ../development/python-modules/inquirer { };
|
||||||
|
|
Loading…
Reference in New Issue