mirror of
https://github.com/davegallant/nix-config
synced 2025-08-06 11:23:40 +00:00
Move overlays into their own dirs
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
{ ... }:
|
||||
final: prev: {
|
||||
|
||||
[
|
||||
(import ./lastpass.nix)
|
||||
(import ./rfd.nix)
|
||||
(import ./srv.nix)
|
||||
(import ./vpngate.nix)
|
||||
]
|
||||
g810-led = prev.callPackage ./g810-led { };
|
||||
lpass = prev.callPackage ./lastpass { };
|
||||
rfd = prev.callPackage ./rfd { };
|
||||
srv = prev.callPackage ./srv { };
|
||||
vpngate = prev.callPackage ./vpngate { };
|
||||
|
||||
}
|
||||
|
47
overlays/g810-led/default.nix
Normal file
47
overlays/g810-led/default.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{ stdenv, lib, fetchFromGitHub, hidapi, profile ? "/etc/g810-led/profile" }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "g810-led";
|
||||
version = "0.4.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "MatMoul";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-FFaOGRLk9wCQ+Xkf/KacXF3rOrvg8xSyeDEwe+K5s/o=";
|
||||
};
|
||||
|
||||
buildInputs = [ hidapi ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -D bin/g810-led $out/bin/g810-led
|
||||
ln -s \./g810-led $out/bin/g213-led
|
||||
ln -s \./g810-led $out/bin/g410-led
|
||||
ln -s \./g810-led $out/bin/g413-led
|
||||
ln -s \./g810-led $out/bin/g512-led
|
||||
ln -s \./g810-led $out/bin/g513-led
|
||||
ln -s \./g810-led $out/bin/g610-led
|
||||
ln -s \./g810-led $out/bin/g815-led
|
||||
ln -s \./g810-led $out/bin/g910-led
|
||||
ln -s \./g810-led $out/bin/gpro-led
|
||||
|
||||
substituteInPlace udev/g810-led.rules \
|
||||
--replace "/usr" $out \
|
||||
--replace "/etc/g810-led/profile" "${profile}"
|
||||
install -D udev/g810-led.rules $out/etc/udev/rules.d/90-g810-led.rules
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description =
|
||||
"Linux LED controller for Logitech G213, G410, G413, G512, G513, G610, G810, G815, G910 and GPRO Keyboards";
|
||||
inherit (src.meta) homepage;
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ samuelgrf ];
|
||||
};
|
||||
}
|
||||
|
@@ -1,36 +0,0 @@
|
||||
self: super: rec {
|
||||
|
||||
lpass = with self;
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lpass";
|
||||
version = "1.3.4-unreleased";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lastpass";
|
||||
repo = "lastpass-cli";
|
||||
rev = "8767b5e53192ad4e72d1352db4aa9218e928cbe1";
|
||||
sha256 = "sha256:1d4m5h9byq5cccdg98m8d8457rbvp28q821d8rpglykgrfgnknwp";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ asciidoc cmake docbook_xsl pkgconfig ];
|
||||
|
||||
buildInputs = [ bash-completion curl openssl libxml2 libxslt ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
installTargets = [ "install" "install-doc" ];
|
||||
|
||||
postInstall = ''
|
||||
install -Dm644 -T ../contrib/lpass_zsh_completion $out/share/zsh/site-functions/_lpass
|
||||
install -Dm644 -T ../contrib/completions-lpass.fish $out/share/fish/vendor_completions.d/lpass.fish
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description =
|
||||
"Stores, retrieves, generates, and synchronizes passwords securely";
|
||||
homepage = "https://github.com/lastpass/lastpass-cli";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
};
|
||||
}
|
35
overlays/lastpass/default.nix
Normal file
35
overlays/lastpass/default.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ stdenv, lib, fetchFromGitHub, asciidoc, cmake, docbook_xsl, pkgconfig
|
||||
, bash-completion, curl, openssl, libxml2, libxslt }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lpass";
|
||||
version = "1.3.4-unreleased";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lastpass";
|
||||
repo = "lastpass-cli";
|
||||
rev = "8767b5e53192ad4e72d1352db4aa9218e928cbe1";
|
||||
sha256 = "sha256:1d4m5h9byq5cccdg98m8d8457rbvp28q821d8rpglykgrfgnknwp";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ asciidoc cmake docbook_xsl pkgconfig ];
|
||||
|
||||
buildInputs = [ bash-completion curl openssl libxml2 libxslt ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
installTargets = [ "install" "install-doc" ];
|
||||
|
||||
postInstall = ''
|
||||
install -Dm644 -T ../contrib/lpass_zsh_completion $out/share/zsh/site-functions/_lpass
|
||||
install -Dm644 -T ../contrib/completions-lpass.fish $out/share/fish/vendor_completions.d/lpass.fish
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description =
|
||||
"Stores, retrieves, generates, and synchronizes passwords securely";
|
||||
homepage = "https://github.com/lastpass/lastpass-cli";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
@@ -1,44 +0,0 @@
|
||||
self: super: rec {
|
||||
|
||||
python38 = with super; super.python38.override { };
|
||||
|
||||
pythonPackages = python38.pkgs;
|
||||
|
||||
rfd = with self;
|
||||
pythonPackages.buildPythonApplication rec {
|
||||
pname = "rfd";
|
||||
version = "v0.6.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "davegallant";
|
||||
repo = "rfd";
|
||||
rev = version;
|
||||
hash = "sha256:0cllhbca4dykl6j8snmml4kk6kzamlzhcrdf49f5v0zk7zljgkl1";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace requirements.txt --replace "soupsieve<=2.0" "soupsieve"
|
||||
substituteInPlace requirements.txt --replace "beautifulsoup4<=4.8.2" "beautifulsoup4"
|
||||
'';
|
||||
|
||||
# No tests included
|
||||
doCheck = false;
|
||||
|
||||
propagatedBuildInputs = with pythonPackages; [
|
||||
beautifulsoup4
|
||||
click
|
||||
colorama
|
||||
requests
|
||||
soupsieve
|
||||
];
|
||||
|
||||
passthru.python3 = python3;
|
||||
|
||||
meta = with super.lib; {
|
||||
homepage = "https://www.redflagdeals.com/";
|
||||
description = "View RedFlagDeals from the command line";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ ];
|
||||
};
|
||||
};
|
||||
}
|
41
overlays/rfd/default.nix
Normal file
41
overlays/rfd/default.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{ lib, fetchFromGitHub, python3, }:
|
||||
|
||||
let py = python3.override { };
|
||||
|
||||
in with py.pkgs;
|
||||
buildPythonApplication rec {
|
||||
pname = "rfd";
|
||||
version = "v0.6.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "davegallant";
|
||||
repo = "rfd";
|
||||
rev = version;
|
||||
hash = "sha256:0cllhbca4dykl6j8snmml4kk6kzamlzhcrdf49f5v0zk7zljgkl1";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace requirements.txt --replace "soupsieve<=2.0" "soupsieve"
|
||||
substituteInPlace requirements.txt --replace "beautifulsoup4<=4.8.2" "beautifulsoup4"
|
||||
'';
|
||||
|
||||
# No tests included
|
||||
doCheck = false;
|
||||
|
||||
propagatedBuildInputs = with py.pkgs; [
|
||||
beautifulsoup4
|
||||
click
|
||||
colorama
|
||||
requests
|
||||
soupsieve
|
||||
];
|
||||
|
||||
passthru.python3 = python3;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.redflagdeals.com/";
|
||||
description = "View RedFlagDeals from the command line";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
@@ -1,26 +0,0 @@
|
||||
self: super:
|
||||
|
||||
rec {
|
||||
|
||||
srv = with self;
|
||||
buildGoModule rec {
|
||||
pname = "srv";
|
||||
version = "v0.1.2";
|
||||
|
||||
vendorSha256 = "sha256-ebumpo9hgr7A+Fsznga4ksYu4mcOIfaaKz0uJu2rivE=";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "davegallant";
|
||||
repo = "srv";
|
||||
rev = version;
|
||||
sha256 = "sha256-x5l/NFEbbRPMBY061g4qRHYV6QUShO7yHqSw+Hir9M0=";
|
||||
};
|
||||
|
||||
meta = with super.lib; {
|
||||
description = "a simple rss viewer";
|
||||
license = licenses.unlicense;
|
||||
maintainers = with maintainers; [ davegallant ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
};
|
||||
}
|
22
overlays/srv/default.nix
Normal file
22
overlays/srv/default.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ lib, fetchFromGitHub, buildGoModule }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "srv";
|
||||
version = "v0.1.2";
|
||||
|
||||
vendorSha256 = "sha256-ebumpo9hgr7A+Fsznga4ksYu4mcOIfaaKz0uJu2rivE=";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "davegallant";
|
||||
repo = "srv";
|
||||
rev = version;
|
||||
sha256 = "sha256-x5l/NFEbbRPMBY061g4qRHYV6QUShO7yHqSw+Hir9M0=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "a simple rss viewer";
|
||||
license = licenses.unlicense;
|
||||
maintainers = with maintainers; [ davegallant ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
@@ -1,27 +0,0 @@
|
||||
self: super:
|
||||
|
||||
rec {
|
||||
|
||||
vpngate = with self;
|
||||
buildGoModule rec {
|
||||
pname = "vpngate";
|
||||
version = "v0.0.2";
|
||||
|
||||
vendorSha256 = "1ys2rvrbxgsrvmjdxqgpmxf0m9nlp905gnr2mrf3c7iaxm86wgf8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "davegallant";
|
||||
repo = "vpngate";
|
||||
rev = version;
|
||||
sha256 = "0ky3wd04xd4sb2zskrrlbgys2gw88yqhngg3bl0sjy8kr6099vfn";
|
||||
};
|
||||
|
||||
meta = with super.lib; {
|
||||
homepage = "https://www.vpngate.net";
|
||||
description = "a client for vpngate.net";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ davegallant ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
};
|
||||
}
|
24
overlays/vpngate/default.nix
Normal file
24
overlays/vpngate/default.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ lib, fetchFromGitHub, buildGoModule }:
|
||||
|
||||
buildGoModule rec {
|
||||
|
||||
pname = "vpngate";
|
||||
version = "v0.0.2";
|
||||
|
||||
vendorSha256 = "1ys2rvrbxgsrvmjdxqgpmxf0m9nlp905gnr2mrf3c7iaxm86wgf8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "davegallant";
|
||||
repo = "vpngate";
|
||||
rev = version;
|
||||
sha256 = "0ky3wd04xd4sb2zskrrlbgys2gw88yqhngg3bl0sjy8kr6099vfn";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.vpngate.net";
|
||||
description = "a client for vpngate.net";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ davegallant ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user