mirror of
https://github.com/ryantm/nixpkgs-update.git
synced 2024-09-20 10:18:00 +03:00
extract isBroken
This commit is contained in:
parent
9238c5c3f2
commit
9608392048
@ -13,6 +13,7 @@ module Nix
|
||||
, getMaintainers
|
||||
, getOldHash
|
||||
, getSrcUrl
|
||||
, getIsBroken
|
||||
, Raw(..)
|
||||
) where
|
||||
|
||||
@ -105,3 +106,11 @@ getMaintainers attrPath =
|
||||
attrPath <>
|
||||
".meta.maintainers or []))))") &
|
||||
rewriteError ("Could not fetch maintainers for" <> attrPath)
|
||||
|
||||
getIsBroken :: Text -> Sh (Either Text Text)
|
||||
getIsBroken attrPath =
|
||||
nixEvalE
|
||||
NoRaw
|
||||
("(let pkgs = import ./. {}; in pkgs." <> attrPath <>
|
||||
".meta.broken or false)") &
|
||||
rewriteError ("Could not get meta.broken for attrpath " <> attrPath)
|
||||
|
@ -38,6 +38,7 @@ import Nix
|
||||
( Raw(..)
|
||||
, compareVersions
|
||||
, getDerivationFile
|
||||
, getIsBroken
|
||||
, getMaintainers
|
||||
, getOldHash
|
||||
, getSrcUrl
|
||||
@ -272,10 +273,7 @@ updatePackage log updateEnv = do
|
||||
commit commitMessage
|
||||
-- Try to push it three times
|
||||
push updateEnv `orElse` push updateEnv `orElse` push updateEnv
|
||||
isBroken <-
|
||||
nixEval
|
||||
("(let pkgs = import ./. {}; in pkgs." <> attrPath <>
|
||||
".meta.broken or false)")
|
||||
isBroken <- eitherToError errorExit (getIsBroken attrPath)
|
||||
let brokenWarning =
|
||||
if isBroken == "true"
|
||||
then "- WARNING: Package has meta.broken=true; Please manually test this package update and remove the broken attribute."
|
||||
|
Loading…
Reference in New Issue
Block a user