From 13d7c14bd06bf22558ca13e0c213cc231c98abdb Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 13 Aug 2019 09:41:55 +0200 Subject: urlwatch: filter defaults to null --- krebs/3modules/urlwatch.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/krebs/3modules/urlwatch.nix b/krebs/3modules/urlwatch.nix index 61ee72e74..f82e68376 100644 --- a/krebs/3modules/urlwatch.nix +++ b/krebs/3modules/urlwatch.nix @@ -75,10 +75,7 @@ let ]; apply = map (x: getAttr (typeOf x) { set = x; - string = { - url = x; - filter = null; - }; + string.url = x; }); }; verbose = mkOption { @@ -210,6 +207,7 @@ let type = types.str; }; filter = mkOption { + default = null; type = with types; nullOr str; # TODO nullOr subtypes.filter }; }; -- cgit v1.2.3 From b13d9d3149c349160e43e9ea1dbe654829b58ad9 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 13 Aug 2019 09:42:14 +0200 Subject: urlwatch: add ignore_cached option --- krebs/3modules/urlwatch.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/krebs/3modules/urlwatch.nix b/krebs/3modules/urlwatch.nix index f82e68376..79b45c622 100644 --- a/krebs/3modules/urlwatch.nix +++ b/krebs/3modules/urlwatch.nix @@ -210,6 +210,10 @@ let default = null; type = with types; nullOr str; # TODO nullOr subtypes.filter }; + ignore_cached = mkOption { + default = null; + type = with types; nullOr bool; + }; }; }; in out -- cgit v1.2.3 From ccb7fb731c9118f86300b2b02c987b28b079c938 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 13 Aug 2019 09:44:26 +0200 Subject: urlwatch: use writeJSON --- krebs/3modules/urlwatch.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/krebs/3modules/urlwatch.nix b/krebs/3modules/urlwatch.nix index 79b45c622..43535b08f 100644 --- a/krebs/3modules/urlwatch.nix +++ b/krebs/3modules/urlwatch.nix @@ -93,7 +93,7 @@ let hooksFile = cfg.hooksFile; - configFile = pkgs.writeText "urlwatch.yaml" (toJSON { + configFile = pkgs.writeJSON "urlwatch.yaml" { display = { error = true; new = true; @@ -129,7 +129,7 @@ let line_length = 75; }; }; - }); + }; imp = { systemd.timers.urlwatch = { -- cgit v1.2.3 From d81e1101ac47010415f2848d22327cc5c807ef0f Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 13 Aug 2019 20:52:11 +0200 Subject: krops: 1.14.0 -> 1.16.0 --- submodules/krops | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/krops b/submodules/krops index ee41207df..8f4446000 160000 --- a/submodules/krops +++ b/submodules/krops @@ -1 +1 @@ -Subproject commit ee41207df1ce718e0b154ed8047384118a0133a4 +Subproject commit 8f44460003ae10f543ccb6a29f15b57e42ca3aad -- cgit v1.2.3 From aac6c242e8da2d630da4b712e20622db604da75a Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 14 Aug 2019 13:07:21 +0200 Subject: nix-prefetch-github: init --- krebs/5pkgs/simple/nix-prefetch-github.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 krebs/5pkgs/simple/nix-prefetch-github.nix diff --git a/krebs/5pkgs/simple/nix-prefetch-github.nix b/krebs/5pkgs/simple/nix-prefetch-github.nix new file mode 100644 index 000000000..14096c33f --- /dev/null +++ b/krebs/5pkgs/simple/nix-prefetch-github.nix @@ -0,0 +1,25 @@ +{ curl, jq, nix, writeDashBin }: + +writeDashBin "nix-prefetch-github" '' + # usage: nix-prefetch-github OWNER REPO [REF] + set -efu + + owner=$1 + repo=$2 + ref=''${3-master} + + info_url=https://api.github.com/repos/$owner/$repo/commits/$ref + info=$(${curl}/bin/curl -fsS "$info_url") + rev=$(printf %s "$info" | ${jq}/bin/jq -r .sha) + + name=$owner-$repo-$ref + url=https://github.com/$owner/$repo/tarball/$rev + sha256=$(${nix}/bin/nix-prefetch-url --name "$name" --unpack "$url") + + export owner repo rev sha256 + ${jq}/bin/jq -n ' + env | { + owner, repo, rev, sha256 + } + ' +'' -- cgit v1.2.3 From 38bf02df0aedd219d70be49c363ccac4da2d09ca Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 4 Sep 2019 20:17:02 +0200 Subject: lib: add packageName --- lib/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/default.nix b/lib/default.nix index 8ba55b571..14e6e27a3 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -30,6 +30,9 @@ let listToAttrs (map (name: nameValuePair name set.${name}) (filter (flip hasAttr set) names)); + packageName = pkg: + pkg.pname or (parseDrvName pkg.name).name; + test = re: x: isString x && testString re x; testString = re: x: match re x != null; -- cgit v1.2.3 From 856ee03a203722722fb646c62c36e4b6aabadaee Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 4 Sep 2019 20:17:56 +0200 Subject: treewide: use packageName --- lass/2configs/br.nix | 9 +++++---- makefu/2configs/default.nix | 3 ++- tv/2configs/br.nix | 9 +++++---- tv/2configs/hw/AO753.nix | 2 +- tv/2configs/hw/w110er.nix | 9 +++++---- tv/2configs/xp-332.nix | 2 +- 6 files changed, 19 insertions(+), 15 deletions(-) diff --git a/lass/2configs/br.nix b/lass/2configs/br.nix index ad307c797..e4ccffe23 100644 --- a/lass/2configs/br.nix +++ b/lass/2configs/br.nix @@ -5,10 +5,11 @@ with import ; ]; - krebs.nixpkgs.allowUnfreePredicate = pkg: any (flip hasPrefix pkg.name) [ - "brother-udev-rule-type1-" - "brscan4-" - "mfcl2700dnlpr-" + krebs.nixpkgs.allowUnfreePredicate = pkg: any (eq (packageName pkg)) [ + "brother-udev-rule-type1" + "brscan4" + "brscan4-etc-files" + "mfcl2700dnlpr" ]; hardware.sane = { diff --git a/makefu/2configs/default.nix b/makefu/2configs/default.nix index 177114a49..5faf3ce93 100644 --- a/makefu/2configs/default.nix +++ b/makefu/2configs/default.nix @@ -31,7 +31,8 @@ with import ; boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; - nixpkgs.config.allowUnfreePredicate = (pkg: pkgs.lib.hasPrefix "unrar-" pkg.name); + nixpkgs.config.allowUnfreePredicate = pkg: packageName pkg == "unrar"; + krebs = { enable = true; diff --git a/tv/2configs/br.nix b/tv/2configs/br.nix index d660ebc35..e6a46e903 100644 --- a/tv/2configs/br.nix +++ b/tv/2configs/br.nix @@ -5,10 +5,11 @@ with import ; ]; - krebs.nixpkgs.allowUnfreePredicate = pkg: any (flip hasPrefix pkg.name) [ - "brother-udev-rule-type1-" - "brscan4-" - "mfcl2700dnlpr-" + krebs.nixpkgs.allowUnfreePredicate = pkg: any (eq (packageName pkg)) [ + "brother-udev-rule-type1" + "brscan4" + "brscan4-etc-files" + "mfcl2700dnlpr" ]; hardware.sane = { diff --git a/tv/2configs/hw/AO753.nix b/tv/2configs/hw/AO753.nix index 4df5e097a..d5b755cef 100644 --- a/tv/2configs/hw/AO753.nix +++ b/tv/2configs/hw/AO753.nix @@ -39,5 +39,5 @@ with import ; HandleSuspendKey=ignore ''; - krebs.nixpkgs.allowUnfreePredicate = pkg: hasPrefix "broadcom-sta-" pkg.name; + krebs.nixpkgs.allowUnfreePredicate = pkg: packageName pkg == "broadcom-sta"; } diff --git a/tv/2configs/hw/w110er.nix b/tv/2configs/hw/w110er.nix index 55e9482d4..7d837eabc 100644 --- a/tv/2configs/hw/w110er.nix +++ b/tv/2configs/hw/w110er.nix @@ -10,10 +10,11 @@ with import ; #hardware.bumblebee.enable = true; #hardware.bumblebee.group = "video"; #hardware.enableRedistributableFirmware= true; - #krebs.nixpkgs.allowUnfreePredicate = pkg: - # hasPrefix "nvidia-x11-" pkg.name || - # hasPrefix "nvidia-persistenced-" pkg.name || - # hasPrefix "nvidia-settings-" pkg.name; + #krebs.nixpkgs.allowUnfreePredicate = pkg: any (eq (packageName pkg)) [ + # "nvidia-x11" + # "nvidia-persistenced" + # "nvidia-settings" + #]; } ]; diff --git a/tv/2configs/xp-332.nix b/tv/2configs/xp-332.nix index 4a0b0ae16..a66b884c8 100644 --- a/tv/2configs/xp-332.nix +++ b/tv/2configs/xp-332.nix @@ -16,7 +16,7 @@ with import ; }; krebs.nixpkgs.allowUnfreePredicate = pkg: - elem (parseDrvName pkg.name).name [ "imagescan-plugin-networkscan" ]; + packageName pkg == "imagescan-plugin-networkscan"; nixpkgs.overlays = singleton (self: super: { utsushi-customized = self.utsushi.override { -- cgit v1.2.3 From a1ca4c183e25b8ea97657c736e23ac71c1c23a17 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 4 Sep 2019 15:55:20 +0200 Subject: tv utsushi: use pname and version --- tv/5pkgs/simple/utsushi.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tv/5pkgs/simple/utsushi.nix b/tv/5pkgs/simple/utsushi.nix index 0ae4ed880..9a86feddf 100644 --- a/tv/5pkgs/simple/utsushi.nix +++ b/tv/5pkgs/simple/utsushi.nix @@ -46,7 +46,8 @@ let ''; imagescan-plugin-networkscan = stdenv.mkDerivation rec { - name = "imagescan-plugin-networkscan-${meta.version}"; + pname = "imagescan-plugin-networkscan"; + version = "1.1.2"; src = if stdenv.system == "i686-linux" then @@ -65,14 +66,14 @@ let ]; sha256 = "1wp372hqhzdar6ldxy7s9js2s872x8c5nwq3608dwg9gca11ppc5"; } - else throw "${name} is not supported on ${stdenv.system} (only i686-linux and x86_64 linux are supported)"; + else throw "${pname} is not supported on ${stdenv.system} (only i686-linux and x86_64 linux are supported)"; dontBuild = true; installPhase = '' # Wildcard * stand for either i386 or amd64 ${dpkg}/bin/dpkg -x \ - plugins/imagescan-plugin-networkscan_${meta.version}-1epson4debian9_*.deb \ + plugins/imagescan-plugin-networkscan_${version}-1epson4debian9_*.deb \ tmp mv tmp/usr $out @@ -94,23 +95,23 @@ let This package provides the unfree networkscan plugin from the Epson Image Scan v3 scanner driver bundle, which can be used by Utsushi. ''; - homepage = "http://support.epson.net/linux/en/imagescanv3.php?version=${meta.version}"; + homepage = "http://support.epson.net/linux/en/imagescanv3.php?version=${version}"; license = stdenv.lib.licenses.eapl; maintainers = [ stdenv.lib.maintainers.tv ]; platforms = stdenv.lib.platforms.linux; - version = "1.1.2"; }; }; in stdenv.mkDerivation rec { - name = "utsushi-${meta.version}"; + pname = "utsushi"; + version = "3.55.0"; src = fetchurl { urls = [ - "http://support.epson.net/linux/src/scanner/imagescanv3/debian/imagescan_${meta.version}.orig.tar.gz" - "http://ni.r/~tv/mirrors/epson/imagescan_${meta.version}.orig.tar.gz" + "http://support.epson.net/linux/src/scanner/imagescanv3/debian/imagescan_${version}.orig.tar.gz" + "http://ni.r/~tv/mirrors/epson/imagescan_${version}.orig.tar.gz" ]; sha256 = "0xwl4xp07cigslbi1qc52jsjvxcyvjlx54g812mn7211p01v2h4l"; }; @@ -212,6 +213,5 @@ stdenv.mkDerivation rec { license = stdenv.lib.licenses.gpl3; maintainers = [ stdenv.lib.maintainers.tv ]; platforms = stdenv.lib.platforms.linux; - version = "3.55.0"; }; } -- cgit v1.2.3 From af6f37979cf1efd0166010c7ebee0e8933759e0b Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 4 Sep 2019 16:08:17 +0200 Subject: tv utsushi: 3.55.0 -> 3.59.2 --- tv/5pkgs/simple/utsushi.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tv/5pkgs/simple/utsushi.nix b/tv/5pkgs/simple/utsushi.nix index 9a86feddf..045271321 100644 --- a/tv/5pkgs/simple/utsushi.nix +++ b/tv/5pkgs/simple/utsushi.nix @@ -106,14 +106,14 @@ in stdenv.mkDerivation rec { pname = "utsushi"; - version = "3.55.0"; + version = "3.59.2"; src = fetchurl { urls = [ "http://support.epson.net/linux/src/scanner/imagescanv3/debian/imagescan_${version}.orig.tar.gz" "http://ni.r/~tv/mirrors/epson/imagescan_${version}.orig.tar.gz" ]; - sha256 = "0xwl4xp07cigslbi1qc52jsjvxcyvjlx54g812mn7211p01v2h4l"; + sha256 = "1mns10mpyjprkrh2bjcg2nda9iyrnd0pf1did9py84glpapkzrdq"; }; preConfigure = '' -- cgit v1.2.3 From 099311c6d828d50238ab485b06548874ec620a31 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 4 Sep 2019 16:01:49 +0200 Subject: tv imagescan-plugin-networkscan: 1.1.2 -> 1.1.3 --- tv/5pkgs/simple/utsushi.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tv/5pkgs/simple/utsushi.nix b/tv/5pkgs/simple/utsushi.nix index 045271321..0414eae09 100644 --- a/tv/5pkgs/simple/utsushi.nix +++ b/tv/5pkgs/simple/utsushi.nix @@ -47,24 +47,24 @@ let imagescan-plugin-networkscan = stdenv.mkDerivation rec { pname = "imagescan-plugin-networkscan"; - version = "1.1.2"; + version = "1.1.3"; src = if stdenv.system == "i686-linux" then fetchurl { urls = [ - "https://download2.ebz.epson.net/imagescanv3/debian/latest1/deb/x86/imagescan-bundle-debian-9-3.55.0.x86.deb.tar.gz" - "http://ni.r/~tv/mirrors/epson/imagescan-bundle-debian-9-3.55.0.x86.deb.tar.gz" + "https://download2.ebz.epson.net/imagescanv3/debian/latest1/deb/x86/imagescan-bundle-debian-9-3.59.2.x86.deb.tar.gz" + "http://ni.r/~tv/mirrors/epson/imagescan-bundle-debian-9-3.59.2.x86.deb.tar.gz" ]; - sha256 = "12syk4y8z22hm9r1lgxqp81vd24jbqgmq83b7yiyqfd4wfxb6k3s"; + sha256 = "1whw96kcfj65h2jnk72xgyr9jj05fa07d0xjxpaqb0zwdag3465g"; } else if stdenv.system == "x86_64-linux" then fetchurl { urls = [ - "https://download2.ebz.epson.net/imagescanv3/debian/latest1/deb/x64/imagescan-bundle-debian-9-3.55.0.x64.deb.tar.gz" - "http://ni.r/~tv/mirrors/epson/imagescan-bundle-debian-9-3.55.0.x64.deb.tar.gz" + "https://download2.ebz.epson.net/imagescanv3/debian/latest1/deb/x64/imagescan-bundle-debian-9-3.59.2.x64.deb.tar.gz" + "http://ni.r/~tv/mirrors/epson/imagescan-bundle-debian-9-3.59.2.x64.deb.tar.gz" ]; - sha256 = "1wp372hqhzdar6ldxy7s9js2s872x8c5nwq3608dwg9gca11ppc5"; + sha256 = "0kd6mrs48wwss54gw4v9fm7ss5ma2xpn6gd1pz26cgjvp6n8hknn"; } else throw "${pname} is not supported on ${stdenv.system} (only i686-linux and x86_64 linux are supported)"; -- cgit v1.2.3 From e388d02623b98bad5db52b29ea1ef1f494fddae8 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 6 Sep 2019 15:07:05 +0200 Subject: exim: init at 4.92.2 because security --- krebs/5pkgs/override/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 krebs/5pkgs/override/default.nix diff --git a/krebs/5pkgs/override/default.nix b/krebs/5pkgs/override/default.nix new file mode 100644 index 000000000..704831823 --- /dev/null +++ b/krebs/5pkgs/override/default.nix @@ -0,0 +1,12 @@ +with import ; +self: super: { + + exim = super.exim.overrideAttrs (old: rec { + name = warnOldVersion old.name "exim-4.92.2"; + src = self.fetchurl { + url = "https://ftp.exim.org/pub/exim/exim4/${name}.tar.xz"; + sha256 = "0m56jsh2fzvwj4rdpcc3pkd5vsi40cjrpzalis7l1zq33m4axmq1"; + }; + }); + +} -- cgit v1.2.3