From 1e7de7c2823a9beea7103249b732f14b1b1e8f78 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 13 Mar 2022 18:35:03 +0100 Subject: nvfetcher --- overlays/afew.nix | 9 +--- overlays/clevis.nix | 3 +- overlays/fast-cli.nix | 12 ++--- overlays/inwx-cdnskey/default.nix | 2 +- overlays/lego.nix | 2 +- overlays/ma1sd.nix | 60 ----------------------- overlays/nerdfonts.nix | 2 +- overlays/nftables-prometheus-exporter/default.nix | 2 +- overlays/persistent-nix-shell/default.nix | 2 +- overlays/pidgin.nix | 57 --------------------- overlays/ppp.nix | 2 +- overlays/sshpass-secret.nix | 2 +- overlays/uhk-agent.nix | 13 ++--- overlays/urxvt/default.nix | 2 +- overlays/v4l2loopback.nix | 12 +---- overlays/worktime/default.nix | 2 +- overlays/xcompose.nix | 16 +----- overlays/zte-prometheus-exporter/default.nix | 2 +- 18 files changed, 23 insertions(+), 179 deletions(-) delete mode 100644 overlays/ma1sd.nix delete mode 100644 overlays/pidgin.nix (limited to 'overlays') diff --git a/overlays/afew.nix b/overlays/afew.nix index 5075d678..17331799 100644 --- a/overlays/afew.nix +++ b/overlays/afew.nix @@ -1,11 +1,6 @@ -final: prev: { +{ final, prev, sources, ... }: { afew = prev.afew.overrideAttrs (oldAttrs: { - src = prev.fetchgit { - url = "https://github.com/gkleen/afew.git"; - rev = "7b96c73000152188bf8ec9168721f26f5bd01aa6"; - sha256 = "09pmfyxq2j0rqvdisahpxpskvxckksx6gq9axdc83ppkws25iprm"; - leaveDotGit = true; - }; + inherit (sources.afew) version afew; nativeBuildInputs = oldAttrs.nativeBuildInputs or [] ++ [ final.git ]; }); diff --git a/overlays/clevis.nix b/overlays/clevis.nix index a786340c..1cc1a717 100644 --- a/overlays/clevis.nix +++ b/overlays/clevis.nix @@ -1,5 +1,4 @@ -final: prev: -{ +{ final, prev, ... }: { clevis = prev.clevis.overrideAttrs (oldAttrs: { buildInputs = (oldAttrs.buildInputs or []) ++ [final.tpm2-tools]; nativeBuildInputs = (oldAttrs.nativeBuildInputs or []) ++ [final.makeWrapper]; diff --git a/overlays/fast-cli.nix b/overlays/fast-cli.nix index 314d3796..932c5a38 100644 --- a/overlays/fast-cli.nix +++ b/overlays/fast-cli.nix @@ -1,14 +1,8 @@ -final: prev: { +{ final, prev, sources, ... }: { fast-cli = prev.buildGoModule rec { pname = "fast-cli"; - version = "0.2.10"; - src = prev.fetchFromGitHub { - owner = "gesquive"; - repo = pname; - rev = "v${version}"; - hash = "sha256-j7/3Llc3jTeJGpOH3Aexm9qcNscuk0mbi4ZCCyzC3+s="; - }; + inherit (sources.fast-cli) version src; vendorSha256 = "sha256-XM/5kUau0JBMxN0UpX6QNI31i8/+HNFvgFUFtlJsBh0="; preBuild = let @@ -34,7 +28,7 @@ final: prev: { ''; ldflags = [ - "-X main.version=${version}" + "-X main.version=${prev.lib.removePrefix "v" version}" ]; }; } diff --git a/overlays/inwx-cdnskey/default.nix b/overlays/inwx-cdnskey/default.nix index c19c2df5..cd564f24 100644 --- a/overlays/inwx-cdnskey/default.nix +++ b/overlays/inwx-cdnskey/default.nix @@ -1,4 +1,4 @@ -final: prev: +{ final, prev, ... }: let packageOverrides = final.callPackage ./python-packages.nix {}; inpPython = final.python39.override { inherit packageOverrides; }; diff --git a/overlays/lego.nix b/overlays/lego.nix index 80e9bd4b..83b1e2e8 100644 --- a/overlays/lego.nix +++ b/overlays/lego.nix @@ -1,4 +1,4 @@ -final: prev: { +{ final, prev, ... }: { lego = prev.lego.override { buildGoModule = args: prev.buildGoModule (args // { patches = (args.patches or []) ++ prev.lib.lists.singleton (prev.fetchpatch { diff --git a/overlays/ma1sd.nix b/overlays/ma1sd.nix deleted file mode 100644 index 3218879b..00000000 --- a/overlays/ma1sd.nix +++ /dev/null @@ -1,60 +0,0 @@ -final: prev: { - ma1sd = let - pname = "ma1sd"; - version = "2.5.0"; - rev = version; - - src = prev.fetchFromGitHub { - inherit rev; - owner = "ma1uta"; - repo = "ma1sd"; - hash = "sha256-K3kaujAhWsRQuTMW3SZOnE7Rmu8+tDXaxpLrb45OI4A="; - }; - - - deps = prev.stdenv.mkDerivation { - pname = "${pname}-deps"; - inherit src version; - nativeBuildInputs = with final; [ gradle_6 perl git ]; - - buildPhase = '' - export MA1SD_BUILD_VERSION=${rev} - export GRADLE_USER_HOME=$(mktemp -d); - gradle --no-daemon build -x test - ''; - - # perl code mavenizes pathes (com.squareup.okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar -> com/squareup/okio/okio/1.13.0/okio-1.13.0.jar) - installPhase = '' - find $GRADLE_USER_HOME/caches/modules-2 -type f -regex '.*\.\(jar\|pom\)' \ - | perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/\s]+))$# ($x = $2) =~ tr|\.|/|; "install -Dm444 $1 \$out/$x/$3/$4/$5" #e' \ - | sh - ''; - - dontStrip = true; - - outputHashAlgo = "sha256"; - outputHashMode = "recursive"; - outputHash = "sha256-P81aY1rOnZdb2UskPIrBe8dfWAicJ3TivBv/NEns5ro="; - }; - in prev.stdenv.mkDerivation { - inherit pname src version; - nativeBuildInputs = with final; [ gradle_6 perl makeWrapper ]; - buildInputs = with final; [ jre ]; - - buildPhase = '' - runHook preBuild - export MA1SD_BUILD_VERSION=${rev} - export GRADLE_USER_HOME=$(mktemp -d) - sed -ie "s#mavenCentral()#mavenLocal(); maven { url '${deps}' }#g; s#mavenCentral()##g" build.gradle - gradle --offline --no-daemon build -x test - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - install -D build/libs/source.jar $out/lib/ma1sd.jar - makeWrapper ${final.jre}/bin/java $out/bin/ma1sd --add-flags "-jar $out/lib/ma1sd.jar" - runHook postInstall - ''; - }; -} diff --git a/overlays/nerdfonts.nix b/overlays/nerdfonts.nix index 28581d72..f4fc6f14 100644 --- a/overlays/nerdfonts.nix +++ b/overlays/nerdfonts.nix @@ -1,4 +1,4 @@ -final: prev: { +{ final, prev, ... }: { nerdfonts = prev.nerdfonts.override { fonts = ["FiraMono" "FiraCode"]; }; diff --git a/overlays/nftables-prometheus-exporter/default.nix b/overlays/nftables-prometheus-exporter/default.nix index 452f160f..aab0c8e9 100644 --- a/overlays/nftables-prometheus-exporter/default.nix +++ b/overlays/nftables-prometheus-exporter/default.nix @@ -1,4 +1,4 @@ -final: prev: +{ final, prev, ... }: let inpPython = final.python310; in { diff --git a/overlays/persistent-nix-shell/default.nix b/overlays/persistent-nix-shell/default.nix index 60396335..c36b9e86 100644 --- a/overlays/persistent-nix-shell/default.nix +++ b/overlays/persistent-nix-shell/default.nix @@ -1,4 +1,4 @@ -final: prev: { +{ final, prev, ... }: { persistent-nix-shell = prev.stdenv.mkDerivation { name = "persistent-nix-shell"; src = ./persistent-nix-shell; diff --git a/overlays/pidgin.nix b/overlays/pidgin.nix deleted file mode 100644 index 4c315f55..00000000 --- a/overlays/pidgin.nix +++ /dev/null @@ -1,57 +0,0 @@ -final: prev: -let - mucHistory = prev.fetchpatch { - url = "https://developer.pidgin.im/raw-attachment/ticket/16524/0001-only-request-unseed-chat-history-from-jabber-group-c.patch"; - sha256 = "083wvmq7417xz55fxxhllqwql1hgjvin2sak08844121yw1jvc44"; - }; - - pidginWrapper = { symlinkJoin, pidgin, makeWrapper, plugins }: - let - extraArgs = map (x: x.wrapArgs or "") plugins; - majorVersion = prev.lib.versions.major pidgin.version; - in symlinkJoin { - name = "pidgin-with-plugins-${pidgin.version}"; - - paths = [ pidgin ] ++ plugins; - - buildInputs = [ makeWrapper ]; - - postBuild = '' - wrapProgram $out/bin/pidgin \ - --suffix-each PURPLE_PLUGIN_PATH ':' "$out/lib/purple-${majorVersion} $out/lib/pidgin" \ - ${toString extraArgs} - wrapProgram $out/bin/finch \ - --suffix-each PURPLE_PLUGIN_PATH ':' "$out/lib/purple-${majorVersion}" \ - ${toString extraArgs} - ''; - }; -in { - pidgin-rocketchat = let - rev = "5c08ad0eacd39914d27b692d7eb42a94a991fb4c"; - in prev.stdenv.mkDerivation { - pname = "pidgin-rocketchat"; - version = builtins.substring 0 8 rev; - - src = prev.fetchFromGitHub { - owner = "EionRobb"; - repo = "purple-rocketchat"; - inherit rev; - hash = "sha256-UBIp5tpj4Xfo+mPhY51+rzs+ojKr90zWK+XLiK7XvWM="; - }; - - nativeBuildInputs = with final; [ pidgin json-glib glib discount ]; - - installFlags = [ - "ROCKETCHAT_DEST=$(out)/lib/purple-2" - "ROCKETCHAT_ICONS_DEST=$(out)/share/pixmaps/pidgin/protocols" - ]; - }; - - pidgin-with-plugins = pidginWrapper { - inherit (prev) makeWrapper symlinkJoin; - plugins = with final; [ purple-lurch pidgin-carbons pidgin-opensteamworks pidgin-xmpp-receipts pidgin-rocketchat ]; - pidgin = prev.pidgin.overrideAttrs (oldAttrs: { - patches = (oldAttrs.patches or []) ++ [mucHistory]; - }); - }; -} diff --git a/overlays/ppp.nix b/overlays/ppp.nix index 38aeaef0..8c6b0798 100644 --- a/overlays/ppp.nix +++ b/overlays/ppp.nix @@ -1,4 +1,4 @@ -final: prev: { +{ final, prev, ... }: { ppp = prev.ppp.overrideAttrs (oldAttrs: { buildInputs = (oldAttrs.buildInputs or []) ++ [ final.systemd ]; makeFlags = (oldAttrs.makeFlags or []) ++ [ "SYSTEMD=yes" ]; diff --git a/overlays/sshpass-secret.nix b/overlays/sshpass-secret.nix index 2f3d6169..388471cb 100644 --- a/overlays/sshpass-secret.nix +++ b/overlays/sshpass-secret.nix @@ -1,4 +1,4 @@ -final: prev: { +{ final, prev, ... }: { sshpassSecret = prev.writeScriptBin "sshpass-secret" '' #!${final.zsh}/bin/zsh -e diff --git a/overlays/uhk-agent.nix b/overlays/uhk-agent.nix index 1b37121f..fcf66c0b 100644 --- a/overlays/uhk-agent.nix +++ b/overlays/uhk-agent.nix @@ -1,19 +1,12 @@ -final: prev: +{ final, prev, sources, ... }: { uhk-agent = let - version = "1.5.15"; - - image = prev.stdenv.mkDerivation { - name = "uhk-agent-image"; - src = prev.fetchurl { - url = "https://github.com/UltimateHackingKeyboard/agent/releases/download/v${version}/UHK.Agent-${version}-linux-x86_64.AppImage"; - hash = "sha256-t2Jwd/x0eTZ4xBaCb/FomH/zSRLt7IIERUF9n9ONCpE="; - }; + image = prev.stdenv.mkDerivation (sources.uhk-agent // { buildCommand = '' install -m 0644 $src $out ''; - }; + }); appimage-run' = prev.appimage-run.override { extraPkgs = p: with p; [ diff --git a/overlays/urxvt/default.nix b/overlays/urxvt/default.nix index 3c57d000..77a2c51f 100644 --- a/overlays/urxvt/default.nix +++ b/overlays/urxvt/default.nix @@ -1,4 +1,4 @@ -final: prev: { +{ final, prev, ... }: { rxvt_unicode-with-plugins = prev.rxvt-unicode.override { configure = { availablePlugins, ... }: { plugins = [ final.urxvt_osc_52 ] ++ builtins.attrValues availablePlugins; diff --git a/overlays/v4l2loopback.nix b/overlays/v4l2loopback.nix index 335f86a3..bb59961f 100644 --- a/overlays/v4l2loopback.nix +++ b/overlays/v4l2loopback.nix @@ -1,16 +1,8 @@ -final: prev: { +{ final, prev, sources, ... }: { linuxPackages_latest = prev.linuxPackages_latest.extend (self: super: { v4l2loopback = super.stdenv.mkDerivation rec { name = "v4l2loopback-${version}-${self.kernel.version}"; - version = "f62fb9076b6313e5eb82fdcaceadb6b3052f346e"; - - src = prev.fetchFromGitHub { - owner = "umlaeute"; - repo = "v4l2loopback"; - rev = "${version}"; - sha256 = "VRFtimQQtT8vd1dx5KtUDkmXo3DSOybhNLcAIxQba44="; - fetchSubmodules = true; - }; + inherit (sources.v4l2loopback) version src; hardeningDisable = [ "format" "pic" ]; diff --git a/overlays/worktime/default.nix b/overlays/worktime/default.nix index a8fe79c6..4322f719 100644 --- a/overlays/worktime/default.nix +++ b/overlays/worktime/default.nix @@ -1,4 +1,4 @@ -final: prev: { +{ final, prev, ... }: { worktime = prev.stdenv.mkDerivation rec { name = "worktime"; src = ./worktime.py; diff --git a/overlays/xcompose.nix b/overlays/xcompose.nix index 2bcd6c01..e7603b83 100644 --- a/overlays/xcompose.nix +++ b/overlays/xcompose.nix @@ -1,17 +1,5 @@ -final: prev: { - xcompose = prev.stdenv.mkDerivation (let - rev = "150c47fabb9f45e81138f71347dc75f69b5dd987"; - in { - pname = "xcompose"; - version = builtins.substring 0 8 rev; - - src = prev.fetchFromGitHub { - owner = "kragen"; - repo = "xcompose"; - inherit rev; - hash = "sha256-XQ0ZuXGvDLz9fJ0yGHtgL4wl9Jx3SG30cGBM2b947iY="; - }; - +{ final, prev, sources, ... }: { + xcompose = prev.stdenv.mkDerivation (sources.xcompose // { nativeBuildInputs = with final; [ perl ]; postPatch = '' diff --git a/overlays/zte-prometheus-exporter/default.nix b/overlays/zte-prometheus-exporter/default.nix index 1609724b..2188e7b3 100644 --- a/overlays/zte-prometheus-exporter/default.nix +++ b/overlays/zte-prometheus-exporter/default.nix @@ -1,4 +1,4 @@ -final: prev: +{ final, prev, ... }: let packageOverrides = final.callPackage ./python-packages.nix {}; inpPython = final.python310.override { inherit packageOverrides; }; -- cgit v1.2.3