misc: Add everything
This commit is contained in:
14
packages/default.nix
Normal file
14
packages/default.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
|
||||
{
|
||||
gamemode = pkgs.callPackage ./gamemode { };
|
||||
key-mapper = pkgs.callPackage ./key-mapper { };
|
||||
vfio-isolate = pkgs.callPackage ./vfio-isolate { };
|
||||
mopidy-funkwhale = pkgs.callPackage ./mopidy-funkwhale {};
|
||||
gnomeExtensions = {
|
||||
notification-timeout = pkgs.callPackage ./gnomeExtensions-notification-timeout {};
|
||||
};
|
||||
gnome = {
|
||||
gnome-terminal = pkgs.callPackage ./gnome-terminal {};
|
||||
};
|
||||
}
|
||||
33
packages/gamemode/default.nix
Normal file
33
packages/gamemode/default.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{ stdenv, lib,
|
||||
meson, ninja, dbus, systemd, pkgconfig, cmake, inih,
|
||||
fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gamemode";
|
||||
version = "1.6.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "FeralInteractive";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "17dck7dzkmzq52f2yrs930fdg2inr7nipvnwpd0jqrwgk2fhwk9z";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson ninja pkgconfig cmake
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
dbus systemd inih
|
||||
];
|
||||
|
||||
mesonFlags = [ "-Dwith-systemd-user-unit-dir=${placeholder "out"}/lib/systemd/user" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Optimise Linux system performance on demand";
|
||||
homepage = "https://github.com/FeralInteractive/gamemode";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
31
packages/gnomeExtensions-notification-timeout/default.nix
Normal file
31
packages/gnomeExtensions-notification-timeout/default.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gnome-shell-extension-notification-timeout";
|
||||
version = "unstable-2021-07-25";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vchlum";
|
||||
repo = "notification-timeout";
|
||||
rev = "1f8c2a433383f974bd49869db5ae7a6d7a82d302";
|
||||
sha256 = "1ndr8gn52qggq45lbdc5miz62is8im34nzmzsghcnarrm73naq59";
|
||||
};
|
||||
|
||||
uuid = "notification-timeout@chlumskyvaclav.gmail.com";
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/gnome-shell/extensions/${uuid}
|
||||
cp -r metadata.json extension.js prefs.js schemas/ $out/share/gnome-shell/extensions/${uuid}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Gnome Shell extension for configuring notification timeout. ";
|
||||
homepage = "https://github.com/vchlum/notification-timeout";
|
||||
license = licenses.mit;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
17
packages/key-mapper/add-scripts.patch
Normal file
17
packages/key-mapper/add-scripts.patch
Normal file
@@ -0,0 +1,17 @@
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 99d298e..74a7948 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -107,6 +107,12 @@ setup(
|
||||
('/usr/bin/', ['bin/key-mapper-control']),
|
||||
('/usr/bin/', ['bin/key-mapper-helper']),
|
||||
],
|
||||
+ scripts=[
|
||||
+ 'bin/key-mapper-gtk',
|
||||
+ 'bin/key-mapper-service',
|
||||
+ 'bin/key-mapper-control',
|
||||
+ 'bin/key-mapper-helper'
|
||||
+ ],
|
||||
install_requires=[
|
||||
'setuptools',
|
||||
'evdev',
|
||||
40
packages/key-mapper/default.nix
Normal file
40
packages/key-mapper/default.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{ pkgs, lib, python3Packages, python3, gtk3, gobject-introspection, git, wrapGAppsHook, gnome }:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "key-mapper";
|
||||
version = "1.0.0";
|
||||
|
||||
buildInputs = [ gobject-introspection gtk3 gnome.adwaita-icon-theme ];
|
||||
|
||||
nativeBuildInputs = [ wrapGAppsHook ];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [ setuptools pydbus evdev pygobject3 ];
|
||||
|
||||
src = builtins.fetchGit {
|
||||
url = "https://github.com/sezanzeb/key-mapper.git";
|
||||
ref = version;
|
||||
};
|
||||
|
||||
doCheck = false;
|
||||
strictDeps = false;
|
||||
|
||||
patches = [
|
||||
./add-scripts.patch
|
||||
./hack-data-dir.patch
|
||||
];
|
||||
|
||||
# Required as we otherwise don't get the dbus policy installed
|
||||
# correctly
|
||||
preInstall = ''
|
||||
# see https://github.com/pypa/setuptools/issues/130
|
||||
${python3}/bin/${python3.executable} setup.py install_data --install-dir=$out --root=$out
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/sezanzeb/key-mapper";
|
||||
description = "A tool to change the mapping of your input device buttons";
|
||||
license = licenses.gpl3;
|
||||
maintainers = [ ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
12
packages/key-mapper/hack-data-dir.patch
Normal file
12
packages/key-mapper/hack-data-dir.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff --git a/keymapper/data.py b/keymapper/data.py
|
||||
index d909399..f7716ac 100644
|
||||
--- a/keymapper/data.py
|
||||
+++ b/keymapper/data.py
|
||||
@@ -68,6 +68,7 @@ def get_data_path(filename=''):
|
||||
'/usr/share/key-mapper',
|
||||
'/usr/local/share/key-mapper',
|
||||
os.path.join(site.USER_BASE, 'share/key-mapper'),
|
||||
+ os.environ["KEYMAPPER_DATA"],
|
||||
]
|
||||
|
||||
if data is None:
|
||||
29
packages/mopidy-funkwhale/default.nix
Normal file
29
packages/mopidy-funkwhale/default.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
{ lib, python3Packages, mopidy }:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "mopidy-funkwhale";
|
||||
version = "1.0";
|
||||
|
||||
src = builtins.fetchTarball {
|
||||
url = "https://files.pythonhosted.org/packages/2a/0a/b7cb53fcc5de17f688f249ff9bfa8bf999085187eae360ae1939a8b0bc29/mopidy_funkwhale-1.0.tar.gz";
|
||||
sha256 = "1migp2xbqv65fw26b8vi8ffwh89h66cx62dpdw6skyn32f5zw4cc";
|
||||
};
|
||||
|
||||
patchPhase = "sed s/vext// -i setup.cfg";
|
||||
|
||||
propagatedBuildInputs = [
|
||||
mopidy
|
||||
python3Packages.pygobject3
|
||||
python3Packages.requests
|
||||
python3Packages.requests_oauthlib
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Mopidy extension for playing music from Funkwhale";
|
||||
license = licenses.gpl3;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
11
packages/overlay.nix
Normal file
11
packages/overlay.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
self: super:
|
||||
|
||||
{
|
||||
gamemode = super.callPackage ./gamemode {};
|
||||
key-mapper = super.callPackage ./key-mapper {};
|
||||
vfio-isolate = super.callPackage ./vfio-isolate {};
|
||||
mopidy-funkwhale = super.callPackage ./mopidy-funkwhale {};
|
||||
gnomeExtensionsCustom = {
|
||||
notification-timeout = super.callPackage ./gnomeExtensions-notification-timeout {};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user