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
|
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
|
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
|
# Prior work
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
name: nix-update
|
name: nixpkgs-update
|
||||||
version: 0.2.0
|
version: 0.2.0
|
||||||
synopsis: Tool for automatic updating of nixpkgs repository
|
synopsis: Tool for automatic updating of nixpkgs repository
|
||||||
homepage: https://github.com/ryantm/nixpkgs-update#readme
|
homepage: https://github.com/ryantm/nixpkgs-update#readme
|
||||||
@ -19,7 +19,7 @@ dependencies:
|
|||||||
- regex-applicative
|
- regex-applicative
|
||||||
|
|
||||||
executables:
|
executables:
|
||||||
nix-update:
|
nixpkgs-update:
|
||||||
source-dirs: src
|
source-dirs: src
|
||||||
main: Main.hs
|
main: Main.hs
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import Control.Applicative (many)
|
|||||||
import Data.Text (Text)
|
import Data.Text (Text)
|
||||||
import Data.Char (isSpace)
|
import Data.Char (isSpace)
|
||||||
import Data.Maybe (isJust)
|
import Data.Maybe (isJust)
|
||||||
import Utils (Version, canFail, succeded)
|
import Utils (Options(..), Version, canFail, succeded)
|
||||||
import Data.Semigroup ((<>))
|
import Data.Semigroup ((<>))
|
||||||
import Shelly
|
import Shelly
|
||||||
import qualified Text.Regex.Applicative as RE
|
import qualified Text.Regex.Applicative as RE
|
||||||
@ -53,10 +53,11 @@ checkBinary addToReport expectedVersion program = do
|
|||||||
checkVersionType addToReport expectedVersion program "help"
|
checkVersionType addToReport expectedVersion program "help"
|
||||||
|
|
||||||
|
|
||||||
checkResult :: FilePath -> Version -> Sh Text
|
checkResult :: Options -> FilePath -> Version -> Sh Text
|
||||||
checkResult resultPath expectedVersion = do
|
checkResult options resultPath expectedVersion = do
|
||||||
home <- get_env_text "home"
|
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"
|
setenv "EDITOR" "echo"
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ programInfo = Opt.info (modeParser <**> Opt.helper)
|
|||||||
makeOptions :: Sh Options
|
makeOptions :: Sh Options
|
||||||
makeOptions = do
|
makeOptions = do
|
||||||
dryRun <- isJust <$> get_env "DRY_RUN"
|
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"
|
githubToken <- cmd "cat" "github_token.txt"
|
||||||
return $ Options dryRun workingDir githubToken
|
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`
|
result <- fromText <$> (cmd "readlink" "./result" `orElse` cmd "readlink" "./result-bin") `orElse`
|
||||||
errorExit "Could not find result link."
|
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
|
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 ""
|
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