mirror of
https://github.com/ryantm/nixpkgs-update.git
synced 2024-12-15 22:01:58 +03:00
rename remaining nix-update mentions
This commit is contained in:
parent
7e033f49a1
commit
1627ca8c95
@ -16,7 +16,7 @@ Scripts to try to update nixpkgs packages. Uses `hub` to automatically make PRs.
|
||||
git clone https://github.com/ryantm/repology-api.git && cd repology-api
|
||||
nix run nixpkgs.cabal2nix -c cabal2nix --shell --hpack . > shell.nix && nix-build shell.nix && result/bin/repology-api > ../packages-to-update.txt
|
||||
```
|
||||
3. Return back `cd ..` and run the tool `result/bin/nix-update`
|
||||
3. Return back `cd ..` and run the tool `result/bin/nixpkgs-update`
|
||||
|
||||
# Prior work
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
name: nix-update
|
||||
name: nixpkgs-update
|
||||
version: 0.2.0
|
||||
synopsis: Tool for automatic updating of nixpkgs repository
|
||||
homepage: https://github.com/ryantm/nixpkgs-update#readme
|
||||
@ -19,7 +19,7 @@ dependencies:
|
||||
- regex-applicative
|
||||
|
||||
executables:
|
||||
nix-update:
|
||||
nixpkgs-update:
|
||||
source-dirs: src
|
||||
main: Main.hs
|
||||
|
||||
|
@ -11,7 +11,7 @@ import Control.Applicative (many)
|
||||
import Data.Text (Text)
|
||||
import Data.Char (isSpace)
|
||||
import Data.Maybe (isJust)
|
||||
import Utils (Version, canFail, succeded)
|
||||
import Utils (Options(..), Version, canFail, succeded)
|
||||
import Data.Semigroup ((<>))
|
||||
import Shelly
|
||||
import qualified Text.Regex.Applicative as RE
|
||||
@ -53,10 +53,11 @@ checkBinary addToReport expectedVersion program = do
|
||||
checkVersionType addToReport expectedVersion program "help"
|
||||
|
||||
|
||||
checkResult :: FilePath -> Version -> Sh Text
|
||||
checkResult resultPath expectedVersion = do
|
||||
checkResult :: Options -> FilePath -> Version -> Sh Text
|
||||
checkResult options resultPath expectedVersion = do
|
||||
home <- get_env_text "home"
|
||||
let logFile = home </> ".nix-update/check-result-log.tmp"
|
||||
|
||||
let logFile = workingDir options </> "check-result-log.tmp"
|
||||
|
||||
setenv "EDITOR" "echo"
|
||||
|
||||
|
@ -37,7 +37,7 @@ programInfo = Opt.info (modeParser <**> Opt.helper)
|
||||
makeOptions :: Sh Options
|
||||
makeOptions = do
|
||||
dryRun <- isJust <$> get_env "DRY_RUN"
|
||||
workingDir <- (</> ".nix-update") <$> get_env_text "HOME"
|
||||
workingDir <- (</> ".nixpkgs-update") <$> get_env_text "HOME"
|
||||
githubToken <- cmd "cat" "github_token.txt"
|
||||
return $ Options dryRun workingDir githubToken
|
||||
|
||||
|
@ -244,7 +244,7 @@ updatePackage options log packageName oldVersion newVersion okToPrAt = do
|
||||
result <- fromText <$> (cmd "readlink" "./result" `orElse` cmd "readlink" "./result-bin") `orElse`
|
||||
errorExit "Could not find result link."
|
||||
|
||||
resultCheckReport <- checkResult result newVersion
|
||||
resultCheckReport <- checkResult options result newVersion
|
||||
|
||||
hasMaintainers <- const True <$> nixEval ("let pkgs = import ./. {}; in pkgs." <> attrPath <> ".meta.maintainers") `orElse` return False
|
||||
maintainers <- if hasMaintainers then rawEval ("let pkgs = import ./. {}; gh = m : m.github or \"\"; nonempty = s: s != \"\"; addat = s: \"@\"+s; in builtins.concatStringsSep \" \" (map addat (builtins.filter nonempty (map gh pkgs." <> attrPath <> ".meta.maintainers)))") else return ""
|
||||
|
Loading…
Reference in New Issue
Block a user