From ec254c685379d517919614e411517cb092968029 Mon Sep 17 00:00:00 2001 From: Christian Kampka Date: Mon, 16 Dec 2019 14:30:44 +0100 Subject: [PATCH 1/3] init at 19.09 --- README.md | 8 ++++---- README.tpl.md | 6 +++--- nix/sources.json | 2 +- src/Niv/Cli.hs | 4 ++-- src/Niv/GitHub/Cmd.hs | 2 +- tests/github/default.nix | 2 +- tests/github/expected/niv-init.json | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index b6e6c3d..52bb3a7 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ initialized with niv and nixpkgs: "nixpkgs": { "url": "https://github.com/NixOS/nixpkgs-channels/archive/109a28ab954a0ad129f7621d468f829981b8b96c.tar.gz", "owner": "NixOS", - "branch": "nixos-19.03", + "branch": "nixos-19.09", "url_template": "https://github.com///archive/.tar.gz", "repo": "nixpkgs-channels", "sha256": "12wnxla7ld4cgpdndaipdh3j4zdalifk287ihxhnmrzrghjahs3q", @@ -133,7 +133,7 @@ import sources.nixpkgs # and use them again! #### Tracking a nixpkgs branch The `init` command sets the `nix/sources.json` file to track the latest commit -present on nixpkgs 19.03 when the command was run. Run the following command to +present on nixpkgs 19.09 when the command was run. Run the following command to update it: ``` shell @@ -143,7 +143,7 @@ $ niv update nixpkgs To change the branch being tracked run this command: ``` shell -$ niv update nixpkgs -b nixos-19.03 # equivalent to --branch nixos-19.03 +$ niv update nixpkgs -b nixos-19.09 # equivalent to --branch nixos-19.09 ``` #### Importing packages from GitHub @@ -224,7 +224,7 @@ Available commands: Examples: niv add stedolan/jq - niv add NixOS/nixpkgs-channels -n nixpkgs -b nixos-19.03 + niv add NixOS/nixpkgs-channels -n nixpkgs -b nixos-19.09 niv add my-package -v alpha-0.1 -t http://example.com/archive/.zip Usage: niv add PACKAGE [-n|--name NAME] ([-a|--attribute KEY=VAL] | diff --git a/README.tpl.md b/README.tpl.md index 6351b73..a43d3ec 100644 --- a/README.tpl.md +++ b/README.tpl.md @@ -96,7 +96,7 @@ initialized with niv and nixpkgs: "nixpkgs": { "url": "https://github.com/NixOS/nixpkgs-channels/archive/109a28ab954a0ad129f7621d468f829981b8b96c.tar.gz", "owner": "NixOS", - "branch": "nixos-19.03", + "branch": "nixos-19.09", "url_template": "https://github.com///archive/.tar.gz", "repo": "nixpkgs-channels", "sha256": "12wnxla7ld4cgpdndaipdh3j4zdalifk287ihxhnmrzrghjahs3q", @@ -133,7 +133,7 @@ import sources.nixpkgs # and use them again! #### Tracking a nixpkgs branch The `init` command sets the `nix/sources.json` file to track the latest commit -present on nixpkgs 19.03 when the command was run. Run the following command to +present on nixpkgs 19.09 when the command was run. Run the following command to update it: ``` shell @@ -143,7 +143,7 @@ $ niv update nixpkgs To change the branch being tracked run this command: ``` shell -$ niv update nixpkgs -b nixos-19.03 # equivalent to --branch nixos-19.03 +$ niv update nixpkgs -b nixos-19.09 # equivalent to --branch nixos-19.09 ``` #### Importing packages from GitHub diff --git a/nix/sources.json b/nix/sources.json index 2247067..c91a444 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -1,6 +1,6 @@ { "nixpkgs": { - "branch": "nixos-19.03", + "branch": "nixos-19.09", "description": "Nixpkgs/NixOS branches that track the Nixpkgs/NixOS channels", "homepage": "https://github.com/NixOS/nixpkgs", "owner": "NixOS", diff --git a/src/Niv/Cli.hs b/src/Niv/Cli.hs index 2eaf622..aa1aeeb 100644 --- a/src/Niv/Cli.hs +++ b/src/Niv/Cli.hs @@ -125,7 +125,7 @@ cmdInit = do , ( pathNixSourcesJson fsj , \path -> do createFile path initNixSourcesJsonContent - -- Imports @niv@ and @nixpkgs@ (19.03) + -- Imports @niv@ and @nixpkgs@ (19.09) say "Importing 'niv' ..." cmdAdd (updateCmd githubCmd) (PackageName "niv") (specToFreeAttrs $ PackageSpec $ HMS.fromList @@ -138,7 +138,7 @@ cmdInit = do (specToFreeAttrs $ PackageSpec $ HMS.fromList [ "owner" .= ("NixOS" :: T.Text) , "repo" .= ("nixpkgs-channels" :: T.Text) - , "branch" .= ("nixos-19.03" :: T.Text) + , "branch" .= ("nixos-19.09" :: T.Text) ] ) , \path _content -> dontCreateFile path) diff --git a/src/Niv/GitHub/Cmd.hs b/src/Niv/GitHub/Cmd.hs index c5b9fbf..f7fddcb 100644 --- a/src/Niv/GitHub/Cmd.hs +++ b/src/Niv/GitHub/Cmd.hs @@ -109,7 +109,7 @@ describeGitHub = mconcat "Examples:" Opts.<$$> "" Opts.<$$> " niv add stedolan/jq" Opts.<$$> - " niv add NixOS/nixpkgs-channels -n nixpkgs -b nixos-19.03" Opts.<$$> + " niv add NixOS/nixpkgs-channels -n nixpkgs -b nixos-19.09" Opts.<$$> " niv add my-package -v alpha-0.1 -t http://example.com/archive/.zip" ] diff --git a/tests/github/default.nix b/tests/github/default.nix index 18a958e..755b2fd 100644 --- a/tests/github/default.nix +++ b/tests/github/default.nix @@ -71,7 +71,7 @@ pkgs.runCommand "test" mkdir -p mock/repos/NixOS/nixpkgs-channels cp ${./data/repos/NixOS/nixpkgs-channels/repository.json} mock/repos/NixOS/nixpkgs-channels/index.html mkdir -p mock/repos/NixOS/nixpkgs-channels/commits - cat ${./data/repos/NixOS/nixpkgs-channels/commits.json} | jq -j '.[0] | .sha' > mock/repos/NixOS/nixpkgs-channels/commits/nixos-19.03 + cat ${./data/repos/NixOS/nixpkgs-channels/commits.json} | jq -j '.[0] | .sha' > mock/repos/NixOS/nixpkgs-channels/commits/nixos-19.09 mkdir -p mock/NixOS/nixpkgs-channels/archive cp ${./data/archives + "/${nixpkgs-channels_HEAD}.tar.gz"} \ mock/NixOS/nixpkgs-channels/archive/${nixpkgs-channels_HEAD}.tar.gz diff --git a/tests/github/expected/niv-init.json b/tests/github/expected/niv-init.json index a9e8ae0..9ac732d 100644 --- a/tests/github/expected/niv-init.json +++ b/tests/github/expected/niv-init.json @@ -12,7 +12,7 @@ "url_template": "http://localhost:3333///archive/.tar.gz" }, "nixpkgs": { - "branch": "nixos-19.03", + "branch": "nixos-19.09", "description": "Nixpkgs/NixOS branches that track the Nixpkgs/NixOS channels", "homepage": null, "owner": "NixOS", From 66a28898b084c22401de9a4092635b41a2b0c2b1 Mon Sep 17 00:00:00 2001 From: Nicolas Mattia Date: Mon, 16 Dec 2019 14:58:18 +0100 Subject: [PATCH 2/3] Update nixpkgs --- nix/sources.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nix/sources.json b/nix/sources.json index c91a444..a4b32f6 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -5,10 +5,10 @@ "homepage": "https://github.com/NixOS/nixpkgs", "owner": "NixOS", "repo": "nixpkgs-channels", - "rev": "5b0b58685d68b9c9c12132f7b392c9dcdecc5931", - "sha256": "1fy1ghl79p3w1vg0hnakvrb1lqic4mjrwmylcgqa5bd4ilfrirzf", + "rev": "d85e435b7bded2596d7b201bcd938c94d8a921c1", + "sha256": "1msjm4kx1z73v444i1iybvmc7z0kfkbn9nzr21rn5yc4ql1jwf99", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs-channels/archive/5b0b58685d68b9c9c12132f7b392c9dcdecc5931.tar.gz", + "url": "https://github.com/NixOS/nixpkgs-channels/archive/d85e435b7bded2596d7b201bcd938c94d8a921c1.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "termtosvg": { From 8cce9b0c7472e7f8edcc55a1f8f594e26a8ba7ab Mon Sep 17 00:00:00 2001 From: Christian Kampka Date: Mon, 16 Dec 2019 22:29:29 +0100 Subject: [PATCH 3/3] Unset SSL file paths in nix shell to return to defaults --- script/test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/test b/script/test index 28e3193..cc623aa 100755 --- a/script/test +++ b/script/test @@ -3,9 +3,9 @@ #!nix-shell -I nixpkgs=./nix #!nix-shell -p nix #!nix-shell --pure -#!nix-shell --keep SSL_CERT_FILE -#!nix-shell --keep NIX_SSL_CERT_FILE +unset NIX_SSL_CERT_FILE +unset SSL_CERT_FILE set -euo pipefail