Merge remote-tracking branch 'ni/master'

This commit is contained in:
lassulus 2019-09-06 15:33:04 +02:00
commit c2773285eb
12 changed files with 84 additions and 38 deletions

View File

@ -75,10 +75,7 @@ let
];
apply = map (x: getAttr (typeOf x) {
set = x;
string = {
url = x;
filter = null;
};
string.url = x;
});
};
verbose = mkOption {
@ -96,7 +93,7 @@ let
hooksFile = cfg.hooksFile;
configFile = pkgs.writeText "urlwatch.yaml" (toJSON {
configFile = pkgs.writeJSON "urlwatch.yaml" {
display = {
error = true;
new = true;
@ -132,7 +129,7 @@ let
line_length = 75;
};
};
});
};
imp = {
systemd.timers.urlwatch = {
@ -210,8 +207,13 @@ let
type = types.str;
};
filter = mkOption {
default = null;
type = with types; nullOr str; # TODO nullOr subtypes.filter
};
ignore_cached = mkOption {
default = null;
type = with types; nullOr bool;
};
};
};
in out

View File

@ -0,0 +1,12 @@
with import <stockholm/lib>;
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";
};
});
}

View File

@ -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
}
'
''

View File

@ -5,10 +5,11 @@ with import <stockholm/lib>;
<nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix>
];
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 = {

View File

@ -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;

View File

@ -31,7 +31,8 @@ with import <stockholm/lib>;
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;

@ -1 +1 @@
Subproject commit ee41207df1ce718e0b154ed8047384118a0133a4
Subproject commit 8f44460003ae10f543ccb6a29f15b57e42ca3aad

View File

@ -5,10 +5,11 @@ with import <stockholm/lib>;
<nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix>
];
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 = {

View File

@ -39,5 +39,5 @@ with import <stockholm/lib>;
HandleSuspendKey=ignore
'';
krebs.nixpkgs.allowUnfreePredicate = pkg: hasPrefix "broadcom-sta-" pkg.name;
krebs.nixpkgs.allowUnfreePredicate = pkg: packageName pkg == "broadcom-sta";
}

View File

@ -10,10 +10,11 @@ with import <stockholm/lib>;
#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"
#];
}
];

View File

@ -16,7 +16,7 @@ with import <stockholm/lib>;
};
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 {

View File

@ -46,33 +46,34 @@ let
'';
imagescan-plugin-networkscan = stdenv.mkDerivation rec {
name = "imagescan-plugin-networkscan-${meta.version}";
pname = "imagescan-plugin-networkscan";
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 "${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,25 +95,25 @@ 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.59.2";
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";
sha256 = "1mns10mpyjprkrh2bjcg2nda9iyrnd0pf1did9py84glpapkzrdq";
};
preConfigure = ''
@ -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";
};
}