Skip to content

Commit

Permalink
Prepare 0.6.0 (#94)
Browse files Browse the repository at this point in the history
* Prepare 0.6.0

* Update actions

* Update default.nix

* Update actions

* Update test
  • Loading branch information
berberman authored Jan 6, 2023
1 parent 2948269 commit 0a9ac5f
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 43 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@ jobs:
nix-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: cachix/install-nix-action@v13
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v18
with:
install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
extra_nix_config: |
experimental-features = nix-command flakes
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-unstable

- name: Run Nix Flake Check
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Revision history for nvfetcher

## 0.6.0.0

* Parse error output from nvchecker
* Add source and fetcher for Docker containers (Thanks to @amesgen)
* Add option fetch.force to always rerun the prefetch rule
* Add `fetchGitHubRelease'` to `PackageSet`
* Add `GetGitCommitDate` rule
* Add `--keyfile` to pass [nvchecker keyfile](https://nvchecker.readthedocs.io/en/latest/usage.html#configuration-table)
* Remove IFD from extracing sources

## 0.5.0.0

There have been many significant changes since the last release.
Expand Down
18 changes: 9 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 29 additions & 24 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@
};
outputs = { self, nixpkgs, flake-utils, flake-compat, ... }:
with flake-utils.lib;
# FIXME: ghc currently doesn't build on aarch64-darwin
eachSystem (nixpkgs.lib.remove "aarch64-darwin" defaultSystems) (system:
eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlay ];
overlays = [ self.overlays.default ];
config = { allowBroken = true; };
};
in with pkgs; rec {
defaultPackage = nvfetcher-bin;
devShell = with haskell.lib;
packages.default = nvfetcher-bin;
devShells.default = with haskell.lib;
(addBuildTools (haskellPackages.nvfetcher) [
haskell-language-server
cabal-install
Expand All @@ -41,26 +40,32 @@
};
hydraJobs = { inherit packages; };
}) // {
overlay = final: prev: {

overlays.default = final: prev: {
haskellPackages = prev.haskellPackages.override (old: {
overrides = final.lib.composeExtensions (old.overrides or (_: _: {})) (hself: hsuper: {
nvfetcher = with final.haskell.lib;
generateOptparseApplicativeCompletion "nvfetcher"
(overrideCabal (prev.haskellPackages.callPackage ./nix { })
(drv: {
# test needs network
doCheck = false;
buildTools = drv.buildTools or [ ] ++ [ final.makeWrapper ];
postInstall = with final;
drv.postInstall or "" + ''
wrapProgram $out/bin/nvfetcher \
--prefix PATH ":" "${
lib.makeBinPath [ nvchecker nix-prefetch nix-prefetch-docker ]
}"
'';
}));
});
overrides =
final.lib.composeExtensions (old.overrides or (_: _: { }))
(hself: hsuper: {
nvfetcher = with final.haskell.lib;
hself.generateOptparseApplicativeCompletions [ "nvfetcher" ]
(overrideCabal (prev.haskellPackages.callPackage ./nix { })
(drv: {
# test needs network
doCheck = false;
buildTools = drv.buildTools or [ ]
++ [ final.makeWrapper ];
postInstall = with final;
drv.postInstall or "" + ''
wrapProgram $out/bin/nvfetcher \
--prefix PATH ":" "${
lib.makeBinPath [
nvchecker
nix-prefetch
nix-prefetch-docker
]
}"
'';
}));
});
});
nvfetcher-bin = with final;
haskell.lib.justStaticExecutables haskellPackages.nvfetcher;
Expand Down
3 changes: 2 additions & 1 deletion nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}:
mkDerivation {
pname = "nvfetcher";
version = "0.5.0.0";
version = "0.6.0.0";
src = ../.;
isLibrary = true;
isExecutable = true;
Expand All @@ -34,4 +34,5 @@ mkDerivation {
homepage = "https://github.com/berberman/nvfetcher";
description = "Generate nix sources expr for the latest version of packages";
license = lib.licenses.mit;
mainProgram = "nvfetcher";
}
4 changes: 2 additions & 2 deletions nvfetcher.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.4
name: nvfetcher
version: 0.5.0.0
version: 0.6.0.0
synopsis:
Generate nix sources expr for the latest version of packages

Expand All @@ -13,7 +13,7 @@ license: MIT
license-file: LICENSE
author: berberman
maintainer: berberman <berberman.yandex.com>
copyright: 2021-2022 berberman
copyright: 2021-2023 berberman
category: Nix
build-type: Simple
extra-doc-files:
Expand Down
2 changes: 1 addition & 1 deletion test/PrefetchSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ spec = aroundShake $
runPrefetchRule' (_sha256 &&& _imageDigest) testDockerFetcher
`shouldReturnJust`
( Checksum "1ly61z3bcs5qvqi2xxp3dd3llh61r9gygphl1ib8pxv64ix738mr",
ContainerDigest "sha256:bc41182d7ef5ffc53a40b044e725193bc10142a1243f395ee852a8d9730fc2ad"
ContainerDigest "sha256:65a2763f593ae85fab3b5406dc9e80f744ec5b449f269b699b5efd37a07ad32e"
)

testDockerFetcher :: NixFetcher Fresh
Expand Down

0 comments on commit 0a9ac5f

Please sign in to comment.