diff --git a/default.nix b/default.nix index 642c84a..901845d 100644 --- a/default.nix +++ b/default.nix @@ -3,4 +3,4 @@ let sources = import ./nix/sources.nix; pkgs = import sources.nixpkgs { }; -in pkgs.callPackage ./site.nix { pkgs = pkgs; } +in pkgs.callPackage ./site.nix { inherit pkgs; } diff --git a/nix/sources.json b/nix/sources.json index b939bc2..00661ab 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -12,15 +12,15 @@ "url_template": "https://github.com///archive/.tar.gz" }, "nixpkgs": { - "branch": "master", - "description": "Nix Packages collection", - "homepage": null, + "branch": "nixpkgs-unstable", + "description": "A read-only mirror of NixOS/nixpkgs tracking the released channels. Send issues and PRs to", + "homepage": "https://github.com/NixOS/nixpkgs", "owner": "NixOS", - "repo": "nixpkgs", - "rev": "48704fbd4fc4dc9660ab04f938048b4894ecb140", - "sha256": "1yghh74jw93air3jwljiyl79iypl9rgr4x4aag0f2jyq73vhzf8p", + "repo": "nixpkgs-channels", + "rev": "cc1ae9f21b9e0ce998e706a3de1bad0b5259f22d", + "sha256": "0zjafww05h50ncapw51b5qxgbv9prjyag0j22jnfc3kcs5xr4ap0", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/48704fbd4fc4dc9660ab04f938048b4894ecb140.tar.gz", + "url": "https://github.com/NixOS/nixpkgs-channels/archive/cc1ae9f21b9e0ce998e706a3de1bad0b5259f22d.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "vgo2nix": { diff --git a/shell.nix b/shell.nix index 1626e5b..8d6eacb 100644 --- a/shell.nix +++ b/shell.nix @@ -1,6 +1,7 @@ let sources = import ./nix/sources.nix; + niv = (import sources.niv { }).niv; pkgs = import sources.nixpkgs { }; xepkgs = import sources.xepkgs { }; vgo2nix = import sources.vgo2nix { }; -in pkgs.mkShell { buildInputs = [ pkgs.go pkgs.niv xepkgs.gopls vgo2nix ]; } +in pkgs.mkShell { buildInputs = [ pkgs.go xepkgs.gopls niv vgo2nix ]; } diff --git a/site.nix b/site.nix index 7062d9b..59996a8 100644 --- a/site.nix +++ b/site.nix @@ -1,4 +1,4 @@ -{ pkgs ? import {} }: +{ pkgs ? import (import ./nix/sources.nix).nixpkgs }: with pkgs; assert lib.versionAtLeast go.version "1.13"; @@ -8,10 +8,9 @@ buildGoPackage rec { version = "latest"; goPackagePath = "christine.website"; src = ./.; - nativeBuildInputs = [ makeWrapper ]; - goDeps = ./deps.nix; allowGoReference = false; + preBuild = '' export CGO_ENABLED=0 buildFlagsArray+=(-pkgdir "$TMPDIR")