simplify blacklists

This commit is contained in:
Ryan Mulligan 2018-07-07 06:46:15 -07:00
parent 49994b5b1c
commit c255581c89

View File

@ -18,50 +18,51 @@ url =
attrPath :: [(Text -> Bool, Text)] attrPath :: [(Text -> Bool, Text)]
attrPath = attrPath =
[ (("lua" `T.isPrefixOf`), "Packages for lua are currently blacklisted.") [ prefix "lua" "Packages for lua are currently blacklisted."
, (("lxqt" `T.isPrefixOf`), "Packages for lxqt are currently blacklisted.") , prefix "lxqt" "Packages for lxqt are currently blacklisted."
, (("altcoins.bitcoin-xt" `T.isPrefixOf`), "nix-prefetch-url has infinite redirect https://github.com/NixOS/nix/issues/2225 remove after Nix upgrade that includes https://github.com/NixOS/nix/commit/b920b908578d68c7c80f1c1e89c42784693e18d5.") , prefix
, (("altcoins.bitcoin" `T.isPrefixOf`), "@roconnor asked for a blacklist on this until something can be done with GPG signatures https://github.com/NixOS/nixpkgs/commit/77f3ac7b7638b33ab198330eaabbd6e0a2e751a9") "altcoins.bitcoin-xt"
"nix-prefetch-url has infinite redirect https://github.com/NixOS/nix/issues/2225 remove after Nix upgrade that includes https://github.com/NixOS/nix/commit/b920b908578d68c7c80f1c1e89c42784693e18d5."
, prefix
"altcoins.bitcoin"
"@roconnor asked for a blacklist on this until something can be done with GPG signatures https://github.com/NixOS/nixpkgs/commit/77f3ac7b7638b33ab198330eaabbd6e0a2e751a9"
] ]
packageName :: Text -> Maybe Text packageName :: Text -> Maybe Text
packageName pn = packageName pn = snd <$> find (\(isBlacklisted, _) -> isBlacklisted pn) nameList
snd <$> find (\(isBlacklisted, _) -> isBlacklisted pn) nameList
nameList :: [(Text -> Bool, Text)] nameList :: [(Text -> Bool, Text)]
nameList = nameList =
[ (("r-" `T.isPrefixOf`), "we don't know how to find the attrpath for these") [ prefix "r-" "we don't know how to find the attrpath for these"
, (("jquery" `T.isInfixOf`), "this isn't a real package") , infixOf "jquery" "this isn't a real package"
, (("google-cloud-sdk" `T.isInfixOf`), "complicated package") , infixOf "google-cloud-sdk" "complicated package"
, (("github-release" `T.isInfixOf`), "complicated package") , infixOf "github-release" "complicated package"
, (("fcitx" `T.isInfixOf`), "gets stuck in daemons") , infixOf
, ( ("libxc" `T.isInfixOf`) "libxc"
, "currently people don't want to update this https://github.com/NixOS/nixpkgs/pull/35821") "currently people don't want to update this https://github.com/NixOS/nixpkgs/pull/35821"
, (("perl" `T.isInfixOf`), "currently don't know how to update perl") , infixOf "perl" "currently don't know how to update perl"
, (("python" `T.isInfixOf`), "currently don't know how to update python") , infixOf "python" "currently don't know how to update python"
, (("cdrtools" `T.isInfixOf`), "We keep downgrading this by accident.") , infixOf "cdrtools" "We keep downgrading this by accident."
, (("gst" `T.isInfixOf`), "gstreamer plugins are kept in lockstep.") , infixOf "gst" "gstreamer plugins are kept in lockstep."
, (("electron" `T.isInfixOf`), "multi-platform srcs in file.") , infixOf "electron" "multi-platform srcs in file."
, ( ("linux-headers" `T.isInfixOf`) , infixOf
, "Not updated until many packages depend on it (part of stdenv).") "linux-headers"
, ( ("mpich" `T.isInfixOf`) "Not updated until many packages depend on it (part of stdenv)."
, "Reported on repology.org as mischaracterized newest version") , infixOf "xfce" "@volth asked to not update xfce"
, (("xfce" `T.isInfixOf`), "@volth asked to not update xfce") , infixOf "cmake-cursesUI-qt4UI" "Derivation file is complicated"
, (("cmake-cursesUI-qt4UI" `T.isInfixOf`), "Derivation file is complicated") , infixOf "iana-etc" "@mic92 takes care of this package"
, ( ("varnish" `T.isInfixOf`) , infixOf
, "Temporary blacklist because of multiple versions and slow nixpkgs update") "checkbashism"
, (("iana-etc" `T.isInfixOf`), "@mic92 takes care of this package") "needs to be fixed, see https://github.com/NixOS/nixpkgs/pull/39552"
, ( ("checkbashism" `T.isInfixOf`) , eq "isl" "multi-version long building package"
, "needs to be fixed, see https://github.com/NixOS/nixpkgs/pull/39552") , infixOf "qscintilla" "https://github.com/ryantm/nixpkgs-update/issues/51"
, ((== "isl"), "multi-version long building package") , eq "itstool" "https://github.com/NixOS/nixpkgs/pull/41339"
, ((== "tokei"), "got stuck forever building with no CPU usage") , eq
, ( ("qscintilla" `T.isInfixOf`) "wire-desktop"
, "https://github.com/ryantm/nixpkgs-update/issues/51") "nixpkgs-update cannot handle this derivation https://github.com/NixOS/nixpkgs/pull/42936#issuecomment-402282692"
, ((== "itstool"), "https://github.com/NixOS/nixpkgs/pull/41339") , infixOf
, ( ("wire-desktop" `T.isInfixOf`) "virtualbox"
, "nixpkgs-update cannot handle this derivation https://github.com/NixOS/nixpkgs/pull/42936#issuecomment-402282692") "nixpkgs-update cannot handle updating the guest additions https://github.com/NixOS/nixpkgs/pull/42934"
, ( ("virtualbox" `T.isInfixOf`)
, "nixpkgs-update cannot handle updating the guest additions https://github.com/NixOS/nixpkgs/pull/42934")
] ]
content :: [(Text, Text)] content :: [(Text, Text)]
@ -83,4 +84,19 @@ checkResult pn =
checkResultList :: [(Text -> Bool, Text)] checkResultList :: [(Text -> Bool, Text)]
checkResultList = checkResultList =
[ (("busybox" `T.isInfixOf`), "- busybox result is not automatically checked, because some binaries kill the shell") ] [ infixOf
"busybox"
"- busybox result is not automatically checked, because some binaries kill the shell"
, infixOf
"fcitx"
"- fcitx result is not automatically checked, because some binaries gets stuck in daemons"
]
prefix :: Text -> Text -> (Text -> Bool, Text)
prefix part reason = ((part `T.isPrefixOf`), reason)
infixOf :: Text -> Text -> (Text -> Bool, Text)
infixOf part reason = ((part `T.isInfixOf`), reason)
eq :: Text -> Text -> (Text -> Bool, Text)
eq part reason = ((part ==), reason)