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 new file mode 100644 index 0000000..9b85b17 --- /dev/null +++ b/content/2018/04-nixconf0218-nix-core-team-binary-cache-improvements.rst @@ -0,0 +1,130 @@ +#04 - NixCon2018, Nix Core Team, binary cache improvements +########################################################## + +:date: 2018-07-25 +:description: back in black + + +.. ----------------------------------------------------------------------------- +.. (OPTIONAL) Introduction text, as an editor this is your space to express + opinions +.. ----------------------------------------------------------------------------- + +NixOS weekly project is rebooting, expect a newsletter every +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 + +Domen + +.. ----------------------------------------------------------------------------- +.. News - Special items that happen in community +.. ----------------------------------------------------------------------------- + +News +==== + +.. - Example news item title `with link`_ +.. +.. News item description (optional) +.. +.. .. _`with link`: http://example.com + + +- `Patreon to support the NixOS OfBorg infrastructure`_ + + This supports Graham's infrastructure costs for the OfBorg tooling. + +- `Introducing the Nix Core Team`_ + +- `NixCon2018 call for proposals`_ + +- `cache.nixos.org now more local`_ + +- `Announcing Cachix - Binary Cache as a Service`_ + + +.. _`Patreon to support the NixOS OfBorg infrastructure`: https://www.patreon.com/ofborg/overview +.. _`Introducing the Nix Core Team`: https://github.com/NixOS/rfcs/pull/25 +.. _`NixCon2018 call for proposals`: https://nixcon2018.org/#call-for-paper +.. _`cache.nixos.org now more local`: https://grahamc.com/blog/cache-nixos-org-now-more-local +.. _`Announcing Cachix - Binary Cache as a Service`: https://domenkozar.com/2018/06/01/announcing-cachix-binary-cache-as-a-service/ + +.. ----------------------------------------------------------------------------- +.. Jobs - list of available Nix related jobs +.. ----------------------------------------------------------------------------- + +.. ----------------------------------------------------------------------------- +.. Reading - List of blog posts, collected (hopefully) via planet.nixos.org +.. ----------------------------------------------------------------------------- + + +Reading +======= + +.. - `Example blog post title`_ +.. +.. optional extra description +.. +.. .. _`blog post title`: http://example.com + + +- `Painlessly developing Python on NixOS with pipenv`_ + +- `A more realistic public Disnix example`_ + +- `nix-language-atlas-javascript`_ + +- `filterSource from .gitignore`_ + +- `Developing with Nix`_ + +.. _`Painlessly developing Python on NixOS with pipenv`: http://sid-kap.github.io/posts/2018-03-08-nix-pipenv.html +.. _`A more realistic public Disnix example`: http://sandervanderburg.blogspot.de/2018/02/a-more-realistic-public-disnix-example.html +.. _`nix-language-atlas-javascript`: https://lastlog.de/blog/posts/nix-language-atlas-javascript.html +.. _`filterSource from .gitignore`: https://github.com/siers/nix-gitignore +.. _`developing with Nix`: https://matrix.ai/2018/03/24/developing-with-nix/ + +.. ----------------------------------------------------------------------------- +.. Tooling - List of useful tools (or their updates) +.. ----------------------------------------------------------------------------- + +Tooling +======= + +.. - `Example tool with a link to it`_ +.. +.. Description what tool does, why it was created, or what is new since last +.. time. +.. +.. .. _`tool name with a link to it`: http://example.com + +- `terraform-provider-nixos`_: Terraform provider for NixOS and NixOps + +- `nix-bundle`_: Bundle Nix derivations to run anywhere! + +- `hocker`_: Utilities for interacting with the docker registry and generating nix build instructions + +.. _`terraform-provider-nixos`: https://github.com/tweag/terraform-provider-nixos +.. _`nix-bundle`: https://github.com/matthewbauer/nix-bundle +.. _`hocker`: https://github.com/awakesecurity/hocker + + +.. ----------------------------------------------------------------------------- +.. Events / Meetups - regular or one time announcements of FUTURE events +.. ----------------------------------------------------------------------------- + + +Contribute to NixOS Weekly Newsletter +===================================== + +This work would not be possible without the many contributions of the community. + +You can help too! Create or comment on the `pull request`_ for the next edition +or look at the `issue tracker`_ to add other improvements. + +.. _`pull request`: https://github.com/NixOS/nixos-weekly/pulls +.. _`issue tracker`: https://github.com/NixOS/nixos-weekly/issues 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