~aasg/haunted-blog

4806aede02644e62a8c6bce2bdc83b8eb04c37eb — Aluísio Augusto Silva Gonçalves 1 year, 1 month ago 63d5e57
ci: Use Nixpkgs revision specified in channels.nix

Just moving more of the build into Nix's control.
2 files changed, 19 insertions(+), 18 deletions(-)

M .build.yml
M default.nix
M .build.yml => .build.yml +6 -8
@@ 1,11 1,4 @@
image: nixos/latest
repositories:
  nixpkgs: https://nixos.org/channels/nixpkgs-unstable
packages:
  - nixpkgs.cachix
  - nixpkgs.ipfs
  - nixpkgs.ipfs-cluster
  - nixpkgs.libarchive
sources:
  - https://git.sr.ht/~aasg/haunted-blog
environment:


@@ 15,7 8,12 @@ secrets:
  - cb717add-b052-4389-ba30-1fafaf9c79c7
tasks:
  - prepare: |
      cachix use aasg-nixexprs
      mkdir -p ~/.config/nix
      cat >~/.config/nix/nix.conf <<EOF
        substituters = https://cache.nixos.org https://aasg-nixexprs.cachix.org
        trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= aasg-nixexprs.cachix.org-1:Oj2bsYzB3GBBF3Q0DT3ELAF6UBrPJkBYYGmoFBWmK1M=
      EOF
      nix-env --file haunted-blog --install --attr ciDeps
  - build: |
      nix-build haunted-blog
  - package: |

M default.nix => default.nix +13 -10
@@ 13,13 13,16 @@
      '' ./.
    ) ./.
}:

pkgs.runCommand "aasg-blog"
{
  nativeBuildInputs = [ aasg-pkgs.haunt ];
  LANG = "C.UTF-8";
} ''
  cd ${src}
  export HAUNT_DESTDIR=$out
  haunt build
''
let
  drv = pkgs.runCommand "aasg-blog"
    {
      nativeBuildInputs = [ aasg-pkgs.haunt ];
      LANG = "C.UTF-8";
    } ''
    cd ${src}
    export HAUNT_DESTDIR=$out
    haunt build
  '';
  ciDeps = with pkgs; [ ipfs ipfs-cluster libarchive ];
in
pkgs.recurseIntoAttrs (drv // { inherit ciDeps; })