From fd7f6c5b9505c9769524b104f2ee8704920f2a11 Mon Sep 17 00:00:00 2001 From: David Arnold Date: Mon, 14 Jun 2021 19:10:28 -0500 Subject: [PATCH] rename: _build -> _sourcess It just looks nicer: https://github.com/divnix/devos/tree/6343a118ca26f4dd25e70dbb1a6cdf742007c32a/pkgs --- .github/workflows/nix.yml | 2 +- .gitignore | 2 +- CHANGELOG.md | 5 +++++ README.md | 2 +- src/NvFetcher.hs | 4 ++-- src/NvFetcher/Options.hs | 2 +- 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index c6b23c7..4bc7b6b 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -25,7 +25,7 @@ jobs: run : nix shell --command nvfetcher --config nvfetcher_example.toml - name: Cleanup - run: rm -r _build sources.nix + run: rm -r _sources sources.nix - name: Test Main_example.hs run: nix develop .\#ghcWithNvfetcher --command runghc Main_example.hs diff --git a/.gitignore b/.gitignore index 508041c..63c85af 100644 --- a/.gitignore +++ b/.gitignore @@ -53,7 +53,7 @@ TAGS # other .DS_Store -_build +_sources sources.nix result diff --git a/CHANGELOG.md b/CHANGELOG.md index 601711a..7391ace 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Revision history for nvfetcher +## unreleased + +* Rename `_build` to `_sources` + + ## 0.3.0.0 There are massive enhancements since the last release: diff --git a/README.md b/README.md index e81f66e..d30860a 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ and nvfetcher will help us keep their version and prefetched SHA256 sums up-to-d Shake will help us handle necessary rebuilds -- we check versions of packages during each run, but only prefetch them when needed. -`sources.nix` is a symlink of `_build/generated.nix`, which means that the "build" results produced by `nvfetcher` are under `_build`, +`sources.nix` is a symlink of `_sources/generated.nix`, which means that the "build" results produced by `nvfetcher` are under `_sources`, so you have to keep this directory for further use. ### Live examples diff --git a/src/NvFetcher.hs b/src/NvFetcher.hs index ba9740d..9a5c2ca 100644 --- a/src/NvFetcher.hs +++ b/src/NvFetcher.hs @@ -139,7 +139,7 @@ runNvFetcherNoCLI args@Args {..} packageSet = do let opts = argShakeOptions { shakeExtra = addShakeExtra shakeExtras (shakeExtra argShakeOptions), - shakeFiles = "_build" + shakeFiles = "_sources" } rules = mainRules args shake opts $ want [argTarget] >> rules @@ -149,7 +149,7 @@ runNvFetcherNoCLI args@Args {..} packageSet = do mainRules :: Args -> Rules () mainRules Args {..} = do "clean" ~> do - removeFilesAfter "_build" ["//*"] + removeFilesAfter "_sources" ["//*"] whenJust argOutputFilePath $ \out -> removeFilesAfter "." [out] argActionAfterClean diff --git a/src/NvFetcher/Options.hs b/src/NvFetcher/Options.hs index 18f3041..dbfe065 100644 --- a/src/NvFetcher/Options.hs +++ b/src/NvFetcher/Options.hs @@ -90,7 +90,7 @@ getCLIOptions parser = do version "nvfetcher - generate nix sources expr for the latest version of packages" ( unlines - [ "It's important to keep _build dir.", + [ "It's important to keep _sources dir.", "If you change any field of an existing package, you may have to run target \"clean\" to invalidate the databse,", "making sure the consistency of our build system." ]