diff --git a/.travis.yml b/.travis.yml index c2f884d..d5ce50a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,4 @@ -sudo: required -services: - - docker +language: nix branches: only: - master @@ -19,7 +17,7 @@ script: echo "SITEURL = 'http://weekly.nixos.org'" >> pelicanconf.py; echo "WITH_FUTURE_DATES = True" >> pelicanconf.py; fi -- ./travis-build -Q default.nix; +- nix-build -Q default.nix; after_success: - env diff --git a/content/2018/04-nixconf0218-nix-core-team-binary-cache-improvements.rst b/content/2018/04-nixconf0218-nix-core-team-binary-cache-improvements.rst index ca6ab49..2b2f116 100644 --- a/content/2018/04-nixconf0218-nix-core-team-binary-cache-improvements.rst +++ b/content/2018/04-nixconf0218-nix-core-team-binary-cache-improvements.rst @@ -16,7 +16,7 @@ Wednesday in the morning (European timezone). You're more than welcome to submit new items with a short description on `latest pull request`_ -.. `latest pull request`: https://github.com/NixOS/nixos-weekly/pulls +-.. _`latest pull request`: https://github.com/NixOS/nixos-weekly/pulls Domen @@ -36,7 +36,7 @@ News - `Patreon to support the NixOS OfBorg infrastructure`_ - This supports `@grhmc`_\'s infrastructure costs for the OfBorg tooling. + This supports Graham's infrastructure costs for the OfBorg tooling. - `Introducing the Nix Core Team`_ diff --git a/default.nix b/default.nix index 093e2a3..1007c42 100644 --- a/default.nix +++ b/default.nix @@ -1,6 +1,4 @@ -let importFromGithub = import ./importFromGithub.nix; in -{ pkgs ? importFromGithub ./nixpkgs.json {} -, pkgs-python ? importFromGithub ./nixpkgs-python.json { inherit pkgs; } +{ pkgs ? import ./nixpkgs.nix }: pkgs.stdenv.mkDerivation { @@ -9,9 +7,9 @@ pkgs.stdenv.mkDerivation { builtins.filterSource (path: type: baseNameOf path != "result") ./.; - buildInputs = - [ pkgs-python.pelican.packages.pelican - pkgs-python.pelican.packages.livereload + buildInputs = with pkgs.python3Packages; + [ pelican + livereload ]; buildPhase = '' pelican diff --git a/importFromGithub.nix b/importFromGithub.nix deleted file mode 100644 index 9968ca1..0000000 --- a/importFromGithub.nix +++ /dev/null @@ -1,61 +0,0 @@ -file: - -let - - fetchFromGithub = - # from https://nixos.wiki/wiki/How_to_fetch_Nixpkgs_with_an_empty_NIX_PATH - { rev # The Git revision of nixpkgs to fetch - , sha256 # The SHA256 of the downloaded data - , owner ? "NixOS" - , repo ? "nixpkgs" - , system ? builtins.currentSystem # This is overridable if necessary - }: - - with { - ifThenElse = { bool, thenValue, elseValue }: ( - if bool then thenValue else elseValue); - }; - - ifThenElse { - bool = (0 <= builtins.compareVersions builtins.nixVersion "1.12"); - - # In Nix 1.12, we can just give a `sha256` to `builtins.fetchTarball`. - thenValue = ( - builtins.fetchTarball { - url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; - inherit sha256; - }); - - # This hack should at least work for Nix 1.11 - elseValue = ( - (rec { - tarball = import { - url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; - inherit sha256; - }; - - builtin-paths = import ; - - script = builtins.toFile "nixpkgs-unpacker" '' - "$coreutils/mkdir" "$out" - cd "$out" - "$gzip" --decompress < "$tarball" | "$tar" -x --strip-components=1 - ''; - - nixpkgs = builtins.derivation { - name = "nixpkgs-${builtins.substring 0 6 rev}"; - - builder = builtins.storePath builtin-paths.shell; - - args = [ script ]; - - inherit tarball system; - - tar = builtins.storePath builtin-paths.tar; - gzip = builtins.storePath builtin-paths.gzip; - coreutils = builtins.storePath builtin-paths.coreutils; - }; - }).nixpkgs); - }; - -in import (fetchFromGithub (builtins.fromJSON (builtins.readFile file))) diff --git a/nix-build-docker b/nix-build-docker deleted file mode 100755 index 6080c3c..0000000 --- a/nix-build-docker +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env sh - -rm -rf result -nix-build $@ - -mv result result.link -mkdir result -cp -r result.link/* result -chown -R $HOST_USER_ID:$HOST_GROUP_ID result -rm -rf result.link diff --git a/nixpkgs-python.json b/nixpkgs-python.json deleted file mode 100644 index a21dfb6..0000000 --- a/nixpkgs-python.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "owner": "garbas", - "repo": "nixpkgs-python", - "rev": "000e638ab79687130ef5088df975be6bc9507150", - "sha256": "11i215j0s0smi25yws74h2m2b84jpf89nj0m63smy1hv39gf28lr" -} diff --git a/nixpkgs.json b/nixpkgs.json deleted file mode 100644 index 5a5a04f..0000000 --- a/nixpkgs.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "owner": "NixOS", - "repo": "nixpkgs-channels", - "rev": "ade98dc442ea78e9783d5e26954e64ec4a1b2c94", - "sha256": "047p5n3dk460s940ms8bih0i0dqmy4nlw0ylz9ysni97jk2xdpwk" -} diff --git a/nixpkgs.nix b/nixpkgs.nix new file mode 100644 index 0000000..b3ddf86 --- /dev/null +++ b/nixpkgs.nix @@ -0,0 +1,9 @@ +let + fetchTarball = { url, sha256 }@attrs: + if builtins.lessThan builtins.nixVersion "1.12" + then builtins.fetchTarball { inherit url; } + else builtins.fetchTarball attrs; +in import (fetchTarball { + url = "https://github.com/NixOS/nixpkgs/archive/b619e0b016c5c79920aa06b78ccf936e56eaf45d.tar.gz"; + sha256 = "1bvnw9dvcbm69s9xbb2npx42zns6zq7jwang8d865pnzb0clf5sv"; +}) { config = {}; overlays = []; } diff --git a/travis-build b/travis-build deleted file mode 100755 index 2918eb0..0000000 --- a/travis-build +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env sh - -docker run \ - -e HOST_USER_ID=$(id -u $USER) \ - -e HOST_GROUP_ID=$(id -g $USER) \ - -v $PWD:/mnt \ - -w /mnt \ - nixos/nix:1.11.14 \ - ./nix-build-docker