nixos/fwupd: use manual list of etc files

Closes: #32142
This commit is contained in:
Jan Tojnar 2018-02-17 04:06:24 +01:00
parent cf1fb92b9e
commit 30cc156c8c
No known key found for this signature in database
GPG key ID: 7FAB2A15F7A607A4
2 changed files with 16 additions and 5 deletions

View file

@ -8,12 +8,8 @@ let
cfg = config.services.fwupd;
originalEtc =
let
isRegular = v: v == "regular";
listFiles = d: builtins.attrNames (filterAttrs (const isRegular) (builtins.readDir d));
copiedDirs = [ "fwupd/remotes.d" "pki/fwupd" "pki/fwupd-metadata" ];
originalFiles = concatMap (d: map (f: "${d}/${f}") (listFiles "${pkgs.fwupd}/etc/${d}")) copiedDirs;
mkEtcFile = n: nameValuePair n { source = "${pkgs.fwupd}/etc/${n}"; };
in listToAttrs (map mkEtcFile originalFiles);
in listToAttrs (map mkEtcFile pkgs.fwupd.filesInstalledToEtc);
extraTrustedKeys =
let
mkName = p: "pki/fwupd/${baseNameOf (toString p)}";

View file

@ -6,6 +6,7 @@
, shared_mime_info, umockdev
}:
let
# Updating? Keep $out/etc synchronized with passthru.filesInstalledToEtc
version = "1.0.5";
python = python3.withPackages (p: with p; [ pygobject3 pycairo pillow ]);
installedTestsPython = python3.withPackages (p: with p; [ pygobject3 requests ]);
@ -66,6 +67,20 @@ in stdenv.mkDerivation {
--prefix GI_TYPELIB_PATH : "$out/lib/girepository-1.0:${libsoup}/lib/girepository-1.0"
'';
passthru = {
filesInstalledToEtc = [
"fwupd/remotes.d/fwupd.conf"
"fwupd/remotes.d/lvfs-testing.conf"
"fwupd/remotes.d/lvfs.conf"
"fwupd/remotes.d/vendor.conf"
"pki/fwupd/GPG-KEY-Hughski-Limited"
"pki/fwupd/GPG-KEY-Linux-Vendor-Firmware-Service"
"pki/fwupd/LVFS-CA.pem"
"pki/fwupd-metadata/GPG-KEY-Linux-Vendor-Firmware-Service"
"pki/fwupd-metadata/LVFS-CA.pem"
];
};
meta = with stdenv.lib; {
homepage = https://fwupd.org/;
maintainers = with maintainers; [];