Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 438a0cd40b2e
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a2429cffa345
Choose a head ref

Commits on Oct 29, 2019

  1. vscode-extensions.redhat.vscode-yaml: init at 0.5.3

    Jonathan Ringer committed Oct 29, 2019

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    NeQuissimus Tim Steinbach
    Copy the full SHA
    880ae34 View commit details
  2. vscode-extensions.ms-azuretools.vscode-docker: init at 0.8.1

    Jonathan Ringer committed Oct 29, 2019

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    NeQuissimus Tim Steinbach
    Copy the full SHA
    434185f View commit details
  3. vscode-extensions.vscodevim.vim: 1.3.0 -> 1.11.3

    Jonathan Ringer committed Oct 29, 2019

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    NeQuissimus Tim Steinbach
    Copy the full SHA
    f0e4e47 View commit details
  4. vscode-extensions.ms-kubernetes-tools.vscode-kubernetes-tools: init a…

    …t 1.0.6
    Jonathan Ringer committed Oct 29, 2019

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    NeQuissimus Tim Steinbach
    Copy the full SHA
    8f25c7a View commit details
  5. vscode-extensions.ms-vscode.Go: init 0.11.7

    Jonathan Ringer committed Oct 29, 2019
    Copy the full SHA
    5ae6ec2 View commit details

Commits on Nov 6, 2019

  1. gitlab: Don't build any gitlab component outside linux

    For some reason hydra seems to have issues downloading the
    gitlab-workhorse source on macOS. Since we don't build the rails app
    for macOS, the other components seem a bit useless there, so we
    limit them to linux for now.
    talyz committed Nov 6, 2019
    Copy the full SHA
    a30facc View commit details
  2. gitlab: Limit node memory consumption to 2048MB

    Hydra fails to build the assets on i686 - it runs out of memory. If we
    limit the max consumption to 2048MB the assets still build, and will
    hopefully also build on hydra.
    talyz committed Nov 6, 2019
    Copy the full SHA
    22302ce View commit details
  3. gitlab: 12.4.1 -> 12.4.2

    talyz committed Nov 6, 2019
    Copy the full SHA
    a779d77 View commit details

Commits on Nov 7, 2019

  1. nixos/caddy: port test to python

    Marijan authored and marijanp committed Nov 7, 2019
    Copy the full SHA
    2f7199a View commit details
  2. nixos/cadvisor: port test to python

    Marijan authored and marijanp committed Nov 7, 2019
    Copy the full SHA
    349c14f View commit details
  3. nixos/certmgr: port test to python

    Marijan authored and marijanp committed Nov 7, 2019
    Copy the full SHA
    63cb143 View commit details
  4. nixos/cfssl: port test to python

    Marijan authored and marijanp committed Nov 7, 2019
    Copy the full SHA
    e05f546 View commit details
  5. nixos/cloud-init: port test to python

    Marijan authored and marijanp committed Nov 7, 2019
    Copy the full SHA
    30d1dfe View commit details
  6. nixos/cjdns: port test to python

    Marijan authored and marijanp committed Nov 7, 2019
    Copy the full SHA
    3695e60 View commit details
  7. nixos/docker: port test to python

    Marijan authored and marijanp committed Nov 7, 2019
    Copy the full SHA
    e2c20c6 View commit details
  8. nixos/documize: port test to python

    Marijan authored and marijanp committed Nov 7, 2019
    Copy the full SHA
    bf816e4 View commit details
  9. nixos/couchdb: port test to python

    Marijan authored and marijanp committed Nov 7, 2019
    Copy the full SHA
    dd188ae View commit details
  10. nixos/dnscrypt-proxy: port test to python

    Marijan authored and marijanp committed Nov 7, 2019
    Copy the full SHA
    f04daa6 View commit details
  11. Copy the full SHA
    2c3785a View commit details
  12. ncmpc: 0.35 -> 0.36

    New release fixing a crash that affects nixos due to the build without
    pcre. https://github.com/MusicPlayerDaemon/ncmpc/releases/tag/v0.36
    phi-gamma committed Nov 7, 2019
    Copy the full SHA
    245f5ec View commit details
  13. Copy the full SHA
    25c2506 View commit details

Commits on Nov 8, 2019

  1. go-ethereum: 1.9.6 -> 1.9.7

    xrelkd committed Nov 8, 2019
    Copy the full SHA
    3ab5272 View commit details
  2. kops_1_14: 1.14.0 -> 1.14.1

    kampka committed Nov 8, 2019
    Copy the full SHA
    1349b26 View commit details
  3. rust: keep multiple version.

    Firefox 70.0.1 and Thunderbird 68.2.2 require older version of rustc.
    taku0 committed Nov 8, 2019
    Copy the full SHA
    97f20c3 View commit details
  4. Merge pull request #73000 from phi-gamma/ncmpc-v0.36

    ncmpc: 0.35 -> 0.36
    fpletz authored Nov 8, 2019
    Copy the full SHA
    5aed8a9 View commit details
  5. Merge pull request #73013 from xrelkd/update/go-ethereum

    go-ethereum: 1.9.6 -> 1.9.7
    adisbladis authored Nov 8, 2019
    Copy the full SHA
    9c0eefb View commit details
  6. Copy the full SHA
    17ba16d View commit details
  7. Copy the full SHA
    53944e4 View commit details
  8. Merge pull request #73035 from kampka/kops_1_14_1

    kops_1_14: 1.14.0 -> 1.14.1
    nlewo authored Nov 8, 2019
    Copy the full SHA
    1d9c207 View commit details
  9. python-modules/neurotools: remove

    It has no dependencies, has not been updated for long and works only with python2
    nixo committed Nov 8, 2019
    Copy the full SHA
    d7a4bcd View commit details
  10. Merge pull request #73039 from taku0/rust_multiple_version

    rust: keep multiple version
    edolstra authored Nov 8, 2019
    Copy the full SHA
    e4a6fba View commit details
  11. Merge pull request #72897 from JohnAZoidberg/python-port-cassandra-test

    nixos/cassandra: Port test to python
    flokli authored Nov 8, 2019
    Copy the full SHA
    cbb8b6d View commit details
  12. Merge pull request #73045 from nico202/master

    python-modules/neurotools: remove
    adisbladis authored Nov 8, 2019
    Copy the full SHA
    a00572a View commit details
  13. Merge pull request #72935 from marijanp/port-tests-python

    Port tests to Python
    flokli authored Nov 8, 2019
    Copy the full SHA
    dd439bc View commit details
  14. Copy the full SHA
    c62815d View commit details
  15. vscode: 1.39.2 -> 1.40.0

    domenkozar committed Nov 8, 2019
    Copy the full SHA
    a2f62bc View commit details
  16. Merge pull request #72894 from talyz/gitlab-12.4.2

    gitlab: 12.4.1 -> 12.4.2
    flokli authored Nov 8, 2019
    Copy the full SHA
    a2429cf View commit details
Showing with 411 additions and 296 deletions.
  1. +31 −26 nixos/tests/caddy.nix
  2. +11 −12 nixos/tests/cadvisor.nix
  3. +74 −60 nixos/tests/cassandra.nix
  4. +14 −14 nixos/tests/certmgr.nix
  5. +4 −4 nixos/tests/cfssl.nix
  6. +25 −22 nixos/tests/cjdns.nix
  7. +8 −5 nixos/tests/cloud-init.nix
  8. +38 −18 nixos/tests/couchdb.nix
  9. +7 −5 nixos/tests/dnscrypt-proxy.nix
  10. +12 −10 nixos/tests/docker-edge.nix
  11. +12 −10 nixos/tests/docker.nix
  12. +30 −26 nixos/tests/documize.nix
  13. +2 −2 pkgs/applications/audio/ncmpc/default.nix
  14. +2 −2 pkgs/applications/blockchains/go-ethereum.nix
  15. +6 −6 pkgs/applications/editors/android-studio/default.nix
  16. +3 −3 pkgs/applications/editors/vscode/vscode.nix
  17. +2 −2 pkgs/applications/networking/cluster/kops/default.nix
  18. +3 −3 pkgs/applications/version-management/gitlab/data.json
  19. +1 −1 pkgs/applications/version-management/gitlab/default.nix
  20. +1 −1 pkgs/applications/version-management/gitlab/gitaly/default.nix
  21. +1 −1 pkgs/applications/version-management/gitlab/gitlab-shell/default.nix
  22. +1 −1 pkgs/applications/version-management/gitlab/gitlab-workhorse/default.nix
  23. +20 −0 pkgs/development/compilers/rust/1_38_0.nix
  24. +20 −0 pkgs/development/compilers/rust/1_39_0.nix
  25. +1 −15 pkgs/development/compilers/rust/bootstrap.nix
  26. +15 −3 pkgs/development/compilers/rust/default.nix
  27. +4 −2 pkgs/development/compilers/rust/rustc.nix
  28. +0 −35 pkgs/development/python-modules/neurotools/default.nix
  29. +52 −3 pkgs/misc/vscode-extensions/default.nix
  30. +11 −2 pkgs/top-level/all-packages.nix
  31. +0 −2 pkgs/top-level/python-packages.nix
57 changes: 31 additions & 26 deletions nixos/tests/caddy.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, ... }: {
import ./make-test-python.nix ({ pkgs, ... }: {
name = "caddy";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ xfix ];
@@ -50,33 +50,38 @@ import ./make-test.nix ({ pkgs, ... }: {
etagSystem = "${nodes.webserver.config.system.build.toplevel}/fine-tune/child-1";
justReloadSystem = "${nodes.webserver.config.system.build.toplevel}/fine-tune/child-2";
in ''
my $url = 'http://localhost/example.html';
$webserver->waitForUnit("caddy");
$webserver->waitForOpenPort("80");
url = "http://localhost/example.html"
webserver.wait_for_unit("caddy")
webserver.wait_for_open_port("80")
sub checkEtag {
my $etag = $webserver->succeed(
'curl -v '.$url.' 2>&1 | sed -n -e "s/^< [Ee][Tt][Aa][Gg]: *//p"'
);
$etag =~ s/\r?\n$//;
my $httpCode = $webserver->succeed(
'curl -w "%{http_code}" -X HEAD -H \'If-None-Match: '.$etag.'\' '.$url
);
die "HTTP code is not 304" unless $httpCode == 304;
return $etag;
}
subtest "check ETag if serving Nix store paths", sub {
my $oldEtag = checkEtag;
$webserver->succeed("${etagSystem}/bin/switch-to-configuration test >&2");
$webserver->sleep(1); # race condition
my $newEtag = checkEtag;
die "Old ETag $oldEtag is the same as $newEtag" if $oldEtag eq $newEtag;
};
def check_etag(url):
etag = webserver.succeed(
"curl -v '{}' 2>&1 | sed -n -e \"s/^< [Ee][Tt][Aa][Gg]: *//p\"".format(url)
)
etag = etag.replace("\r\n", " ")
http_code = webserver.succeed(
"curl -w \"%{{http_code}}\" -X HEAD -H 'If-None-Match: {}' {}".format(etag, url)
)
assert int(http_code) == 304, "HTTP code is not 304"
return etag
subtest "config is reloaded on nixos-rebuild switch", sub {
$webserver->succeed("${justReloadSystem}/bin/switch-to-configuration test >&2");
$webserver->waitForOpenPort("8080");
};
with subtest("check ETag if serving Nix store paths"):
old_etag = check_etag(url)
webserver.succeed(
"${etagSystem}/bin/switch-to-configuration test >&2"
)
webserver.sleep(1)
new_etag = check_etag(url)
assert old_etag != new_etag, "Old ETag {} is the same as {}".format(
old_etag, new_etag
)
with subtest("config is reloaded on nixos-rebuild switch"):
webserver.succeed(
"${justReloadSystem}/bin/switch-to-configuration test >&2"
)
webserver.wait_for_open_port("8080")
'';
})
23 changes: 11 additions & 12 deletions nixos/tests/cadvisor.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, ... } : {
import ./make-test-python.nix ({ pkgs, ... } : {
name = "cadvisor";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ offline ];
@@ -16,20 +16,19 @@ import ./make-test.nix ({ pkgs, ... } : {
};
};

testScript =
''
startAll;
$machine->waitForUnit("cadvisor.service");
$machine->succeed("curl http://localhost:8080/containers/");
testScript = ''
start_all()
machine.wait_for_unit("cadvisor.service")
machine.succeed("curl http://localhost:8080/containers/")
$influxdb->waitForUnit("influxdb.service");
influxdb.wait_for_unit("influxdb.service")
# create influxdb database
$influxdb->succeed(q~
curl -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE root"
~);
influxdb.succeed(
'curl -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE root"'
)
$influxdb->waitForUnit("cadvisor.service");
$influxdb->succeed("curl http://localhost:8080/containers/");
influxdb.wait_for_unit("cadvisor.service")
influxdb.succeed("curl http://localhost:8080/containers/")
'';
})
134 changes: 74 additions & 60 deletions nixos/tests/cassandra.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, lib, ... }:
import ./make-test-python.nix ({ pkgs, lib, ... }:
let
# Change this to test a different version of Cassandra:
testPackage = pkgs.cassandra;
@@ -9,13 +9,16 @@ let
jmxRolesFile = ./cassandra-jmx-roles;
jmxAuthArgs = "-u ${(builtins.elemAt jmxRoles 0).username} -pw ${(builtins.elemAt jmxRoles 0).password}";
jmxPort = 7200; # Non-standard port so it doesn't accidentally work
jmxPortStr = toString jmxPort;

# Would usually be assigned to 512M
# Would usually be assigned to 512M.
# Set it to a different value, so that we can check whether our config
# actually changes it.
numMaxHeapSize = "400";
getHeapLimitCommand = ''
nodetool info -p ${toString jmxPort} | grep "^Heap Memory" | awk \'{print $NF}\'
nodetool info -p ${jmxPortStr} | grep "^Heap Memory" | awk '{print $NF}'
'';
checkHeapLimitCommand = ''
checkHeapLimitCommand = pkgs.writeShellScript "check-heap-limit.sh" ''
[ 1 -eq "$(echo "$(${getHeapLimitCommand}) < ${numMaxHeapSize}" | ${pkgs.bc}/bin/bc)" ]
'';

@@ -44,74 +47,85 @@ let
};
in
{
name = "cassandra-ci";
name = "cassandra";
meta = {
maintainers = with lib.maintainers; [ johnazoidberg ];
};

nodes = {
cass0 = nodeCfg "192.168.1.1" {};
cass1 = nodeCfg "192.168.1.2" (lib.optionalAttrs testRemoteAuth { inherit jmxRoles; remoteJmx = true; });
cass2 = nodeCfg "192.168.1.3" { jvmOpts = [ "-Dcassandra.replace_address=cass1" ]; };
};

testScript = let
jmxPortS = toString jmxPort;
in ''
testScript = ''
# Check configuration
subtest "Timers exist", sub {
$cass0->succeed("systemctl list-timers | grep cassandra-full-repair.timer");
$cass0->succeed("systemctl list-timers | grep cassandra-incremental-repair.timer");
};
subtest "Can connect via cqlsh", sub {
$cass0->waitForUnit("cassandra.service");
$cass0->waitUntilSucceeds("nc -z cass0 9042");
$cass0->succeed("echo 'show version;' | cqlsh cass0");
};
subtest "Nodetool is operational", sub {
$cass0->waitForUnit("cassandra.service");
$cass0->waitUntilSucceeds("nc -z localhost ${jmxPortS}");
$cass0->succeed("nodetool status -p ${jmxPortS} --resolve-ip | egrep '^UN[[:space:]]+cass0'");
};
subtest "Cluster name was set", sub {
$cass0->waitForUnit("cassandra.service");
$cass0->waitUntilSucceeds("nc -z localhost ${jmxPortS}");
$cass0->waitUntilSucceeds("nodetool describecluster -p ${jmxPortS} | grep 'Name: ${clusterName}'");
};
subtest "Heap limit set correctly", sub {
# Nodetool takes a while until it can display info
$cass0->waitUntilSucceeds('nodetool info -p ${jmxPortS}');
$cass0->succeed('${checkHeapLimitCommand}');
};
with subtest("Timers exist"):
cass0.succeed("systemctl list-timers | grep cassandra-full-repair.timer")
cass0.succeed("systemctl list-timers | grep cassandra-incremental-repair.timer")
with subtest("Can connect via cqlsh"):
cass0.wait_for_unit("cassandra.service")
cass0.wait_until_succeeds("nc -z cass0 9042")
cass0.succeed("echo 'show version;' | cqlsh cass0")
with subtest("Nodetool is operational"):
cass0.wait_for_unit("cassandra.service")
cass0.wait_until_succeeds("nc -z localhost ${jmxPortStr}")
cass0.succeed("nodetool status -p ${jmxPortStr} --resolve-ip | egrep '^UN[[:space:]]+cass0'")
with subtest("Cluster name was set"):
cass0.wait_for_unit("cassandra.service")
cass0.wait_until_succeeds("nc -z localhost ${jmxPortStr}")
cass0.wait_until_succeeds(
"nodetool describecluster -p ${jmxPortStr} | grep 'Name: ${clusterName}'"
)
with subtest("Heap limit set correctly"):
# Nodetool takes a while until it can display info
cass0.wait_until_succeeds("nodetool info -p ${jmxPortStr}")
cass0.succeed("${checkHeapLimitCommand}")
# Check cluster interaction
subtest "Bring up cluster", sub {
$cass1->waitForUnit("cassandra.service");
$cass1->waitUntilSucceeds("nodetool -p ${jmxPortS} ${jmxAuthArgs} status | egrep -c '^UN' | grep 2");
$cass0->succeed("nodetool status -p ${jmxPortS} --resolve-ip | egrep '^UN[[:space:]]+cass1'");
};
with subtest("Bring up cluster"):
cass1.wait_for_unit("cassandra.service")
cass1.wait_until_succeeds(
"nodetool -p ${jmxPortStr} ${jmxAuthArgs} status | egrep -c '^UN' | grep 2"
)
cass0.succeed("nodetool status -p ${jmxPortStr} --resolve-ip | egrep '^UN[[:space:]]+cass1'")
'' + lib.optionalString testRemoteAuth ''
subtest "Remote authenticated jmx", sub {
# Doesn't work if not enabled
$cass0->waitUntilSucceeds("nc -z localhost ${jmxPortS}");
$cass1->fail("nc -z 192.168.1.1 ${toString jmxPort}");
$cass1->fail("nodetool -p ${jmxPortS} -h 192.168.1.1 status");
with subtest("Remote authenticated jmx"):
# Doesn't work if not enabled
cass0.wait_until_succeeds("nc -z localhost ${jmxPortStr}")
cass1.fail("nc -z 192.168.1.1 ${jmxPortStr}")
cass1.fail("nodetool -p ${jmxPortStr} -h 192.168.1.1 status")
# Works if enabled
$cass1->waitUntilSucceeds("nc -z localhost ${toString jmxPort}");
$cass0->succeed("nodetool -p ${jmxPortS} -h 192.168.1.2 ${jmxAuthArgs} status");
};
# Works if enabled
cass1.wait_until_succeeds("nc -z localhost ${jmxPortStr}")
cass0.succeed("nodetool -p ${jmxPortStr} -h 192.168.1.2 ${jmxAuthArgs} status")
'' + ''
subtest "Break and fix node", sub {
$cass1->block;
$cass0->waitUntilSucceeds("nodetool status -p ${jmxPortS} --resolve-ip | egrep -c '^DN[[:space:]]+cass1'");
$cass0->succeed("nodetool status -p ${jmxPortS} | egrep -c '^UN' | grep 1");
$cass1->unblock;
$cass1->waitUntilSucceeds("nodetool -p ${jmxPortS} ${jmxAuthArgs} status | egrep -c '^UN' | grep 2");
$cass0->succeed("nodetool status -p ${jmxPortS} | egrep -c '^UN' | grep 2");
};
subtest "Replace crashed node", sub {
$cass1->crash;
$cass2->waitForUnit("cassandra.service");
$cass0->waitUntilFails("nodetool status -p ${jmxPortS} --resolve-ip | egrep '^UN[[:space:]]+cass1'");
$cass0->waitUntilSucceeds("nodetool status -p ${jmxPortS} --resolve-ip | egrep '^UN[[:space:]]+cass2'");
};
with subtest("Break and fix node"):
cass1.block()
cass0.wait_until_succeeds(
"nodetool status -p ${jmxPortStr} --resolve-ip | egrep -c '^DN[[:space:]]+cass1'"
)
cass0.succeed("nodetool status -p ${jmxPortStr} | egrep -c '^UN' | grep 1")
cass1.unblock()
cass1.wait_until_succeeds(
"nodetool -p ${jmxPortStr} ${jmxAuthArgs} status | egrep -c '^UN' | grep 2"
)
cass0.succeed("nodetool status -p ${jmxPortStr} | egrep -c '^UN' | grep 2")
with subtest("Replace crashed node"):
cass1.block() # .crash() waits until it's fully shutdown
cass2.start()
cass0.wait_until_fails(
"nodetool status -p ${jmxPortStr} --resolve-ip | egrep '^UN[[:space:]]+cass1'"
)
cass2.wait_for_unit("cassandra.service")
cass0.wait_until_succeeds(
"nodetool status -p ${jmxPortStr} --resolve-ip | egrep '^UN[[:space:]]+cass2'"
)
'';
})
28 changes: 14 additions & 14 deletions nixos/tests/certmgr.nix
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
pkgs ? import ../.. { inherit system config; }
}:

with import ../lib/testing.nix { inherit system pkgs; };
with import ../lib/testing-python.nix { inherit system pkgs; };
let
mkSpec = { host, service ? null, action }: {
inherit action;
@@ -123,17 +123,17 @@ in
)));
};
testScript = ''
$machine->waitForUnit('cfssl.service');
$machine->waitUntilSucceeds('ls /tmp/decl.example.org-ca.pem');
$machine->waitUntilSucceeds('ls /tmp/decl.example.org-key.pem');
$machine->waitUntilSucceeds('ls /tmp/decl.example.org-cert.pem');
$machine->waitUntilSucceeds('ls /tmp/imp.example.org-ca.pem');
$machine->waitUntilSucceeds('ls /tmp/imp.example.org-key.pem');
$machine->waitUntilSucceeds('ls /tmp/imp.example.org-cert.pem');
$machine->waitForUnit('nginx.service');
$machine->succeed('[ "1" -lt "$(journalctl -u nginx | grep "Starting Nginx" | wc -l)" ]');
$machine->succeed('curl --cacert /tmp/imp.example.org-ca.pem https://imp.example.org');
$machine->succeed('curl --cacert /tmp/decl.example.org-ca.pem https://decl.example.org');
machine.wait_for_unit("cfssl.service")
machine.wait_until_succeeds("ls /tmp/decl.example.org-ca.pem")
machine.wait_until_succeeds("ls /tmp/decl.example.org-key.pem")
machine.wait_until_succeeds("ls /tmp/decl.example.org-cert.pem")
machine.wait_until_succeeds("ls /tmp/imp.example.org-ca.pem")
machine.wait_until_succeeds("ls /tmp/imp.example.org-key.pem")
machine.wait_until_succeeds("ls /tmp/imp.example.org-cert.pem")
machine.wait_for_unit("nginx.service")
assert 1 < int(machine.succeed('journalctl -u nginx | grep "Starting Nginx" | wc -l'))
machine.succeed("curl --cacert /tmp/imp.example.org-ca.pem https://imp.example.org")
machine.succeed("curl --cacert /tmp/decl.example.org-ca.pem https://decl.example.org")
'';
};

@@ -143,8 +143,8 @@ in
test = mkSpec { host = "command.example.org"; action = "touch /tmp/command.executed"; };
};
testScript = ''
$machine->waitForUnit('cfssl.service');
$machine->waitUntilSucceeds('stat /tmp/command.executed');
machine.wait_for_unit("cfssl.service")
machine.wait_until_succeeds("stat /tmp/command.executed")
'';
};

8 changes: 4 additions & 4 deletions nixos/tests/cfssl.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, ...} : {
import ./make-test-python.nix ({ pkgs, ...} : {
name = "cfssl";

machine = { config, lib, pkgs, ... }:
@@ -60,8 +60,8 @@ import ./make-test.nix ({ pkgs, ...} : {
});
in
''
$machine->waitForUnit('cfssl.service');
$machine->waitUntilSucceeds('${cfsslrequest}');
$machine->succeed('ls /tmp/certificate-key.pem');
machine.wait_for_unit("cfssl.service")
machine.wait_until_succeeds("${cfsslrequest}")
machine.succeed("ls /tmp/certificate-key.pem")
'';
})
47 changes: 25 additions & 22 deletions nixos/tests/cjdns.nix
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ let

in

import ./make-test.nix ({ pkgs, ...} : {
import ./make-test-python.nix ({ pkgs, ...} : {
name = "cjdns";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ ehmry ];
@@ -83,36 +83,39 @@ import ./make-test.nix ({ pkgs, ...} : {

testScript =
''
startAll;
import re
$alice->waitForUnit("cjdns.service");
$bob->waitForUnit("cjdns.service");
$carol->waitForUnit("cjdns.service");
start_all()
sub cjdnsIp {
my ($machine) = @_;
my $ip = (split /[ \/]+/, $machine->succeed("ip -o -6 addr show dev tun0"))[3];
$machine->log("has ip $ip");
return $ip;
}
alice.wait_for_unit("cjdns.service")
bob.wait_for_unit("cjdns.service")
carol.wait_for_unit("cjdns.service")
my $aliceIp6 = cjdnsIp $alice;
my $bobIp6 = cjdnsIp $bob;
my $carolIp6 = cjdnsIp $carol;
def cjdns_ip(machine):
res = machine.succeed("ip -o -6 addr show dev tun0")
ip = re.split("\s+|/", res)[3]
machine.log("has ip {}".format(ip))
return ip
alice_ip6 = cjdns_ip(alice)
bob_ip6 = cjdns_ip(bob)
carol_ip6 = cjdns_ip(carol)
# ping a few times each to let the routing table establish itself
$alice->succeed("ping -c 4 $carolIp6");
$bob->succeed("ping -c 4 $carolIp6");
alice.succeed("ping -c 4 {}".format(carol_ip6))
bob.succeed("ping -c 4 {}".format(carol_ip6))
$carol->succeed("ping -c 4 $aliceIp6");
$carol->succeed("ping -c 4 $bobIp6");
carol.succeed("ping -c 4 {}".format(alice_ip6))
carol.succeed("ping -c 4 {}".format(bob_ip6))
$alice->succeed("ping -c 4 $bobIp6");
$bob->succeed("ping -c 4 $aliceIp6");
alice.succeed("ping -c 4 {}".format(bob_ip6))
bob.succeed("ping -c 4 {}".format(alice_ip6))
$alice->waitForUnit("httpd.service");
alice.wait_for_unit("httpd.service")
$bob->succeed("curl --fail -g http://[$aliceIp6]");
bob.succeed("curl --fail -g http://[{}]".format(alice_ip6))
'';
})
13 changes: 8 additions & 5 deletions nixos/tests/cloud-init.nix
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
pkgs ? import ../.. { inherit system config; }
}:

with import ../lib/testing.nix { inherit system pkgs; };
with import ../lib/testing-python.nix { inherit system pkgs; };
with pkgs.lib;

let
@@ -30,6 +30,7 @@ let
'';
};
in makeTest {
name = "cloud-init";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ lewo ];
};
@@ -40,10 +41,12 @@ in makeTest {
services.cloud-init.enable = true;
};
testScript = ''
$machine->start;
$machine->waitForUnit("cloud-init.service");
$machine->succeed("cat /tmp/cloudinit-write-file | grep -q 'cloudinit'");
machine.start()
machine.wait_for_unit("cloud-init.service")
machine.succeed("cat /tmp/cloudinit-write-file | grep -q 'cloudinit'")
$machine->waitUntilSucceeds("cat /root/.ssh/authorized_keys | grep -q 'should be a key!'");
machine.wait_until_succeeds(
"cat /root/.ssh/authorized_keys | grep -q 'should be a key!'"
)
'';
}
56 changes: 38 additions & 18 deletions nixos/tests/couchdb.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, lib, ...}:
import ./make-test-python.nix ({ pkgs, lib, ...}:

with lib;

@@ -35,22 +35,42 @@ with lib;
fi
'';
in ''
startAll;
$couchdb1->waitForUnit("couchdb.service");
$couchdb1->waitUntilSucceeds("${curlJqCheck "GET" "" ".couchdb" "Welcome"}");
$couchdb1->waitUntilSucceeds("${curlJqCheck "GET" "_all_dbs" ". | length" "2"}");
$couchdb1->succeed("${curlJqCheck "PUT" "foo" ".ok" "true"}");
$couchdb1->succeed("${curlJqCheck "GET" "_all_dbs" ". | length" "3"}");
$couchdb1->succeed("${curlJqCheck "DELETE" "foo" ".ok" "true"}");
$couchdb1->succeed("${curlJqCheck "GET" "_all_dbs" ". | length" "2"}");
$couchdb2->waitForUnit("couchdb.service");
$couchdb2->waitUntilSucceeds("${curlJqCheck "GET" "" ".couchdb" "Welcome"}");
$couchdb2->waitUntilSucceeds("${curlJqCheck "GET" "_all_dbs" ". | length" "0"}");
$couchdb2->succeed("${curlJqCheck "PUT" "foo" ".ok" "true"}");
$couchdb2->succeed("${curlJqCheck "GET" "_all_dbs" ". | length" "1"}");
$couchdb2->succeed("${curlJqCheck "DELETE" "foo" ".ok" "true"}");
$couchdb2->succeed("${curlJqCheck "GET" "_all_dbs" ". | length" "0"}");
start_all()
couchdb1.wait_for_unit("couchdb.service")
couchdb1.wait_until_succeeds(
"${curlJqCheck "GET" "" ".couchdb" "Welcome"}"
)
couchdb1.wait_until_succeeds(
"${curlJqCheck "GET" "_all_dbs" ". | length" "2"}"
)
couchdb1.succeed("${curlJqCheck "PUT" "foo" ".ok" "true"}")
couchdb1.succeed(
"${curlJqCheck "GET" "_all_dbs" ". | length" "3"}"
)
couchdb1.succeed(
"${curlJqCheck "DELETE" "foo" ".ok" "true"}"
)
couchdb1.succeed(
"${curlJqCheck "GET" "_all_dbs" ". | length" "2"}"
)
couchdb2.wait_for_unit("couchdb.service")
couchdb2.wait_until_succeeds(
"${curlJqCheck "GET" "" ".couchdb" "Welcome"}"
)
couchdb2.wait_until_succeeds(
"${curlJqCheck "GET" "_all_dbs" ". | length" "0"}"
)
couchdb2.succeed("${curlJqCheck "PUT" "foo" ".ok" "true"}")
couchdb2.succeed(
"${curlJqCheck "GET" "_all_dbs" ". | length" "1"}"
)
couchdb2.succeed(
"${curlJqCheck "DELETE" "foo" ".ok" "true"}"
)
couchdb2.succeed(
"${curlJqCheck "GET" "_all_dbs" ". | length" "0"}"
)
'';
})
12 changes: 7 additions & 5 deletions nixos/tests/dnscrypt-proxy.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, ... }: {
import ./make-test-python.nix ({ pkgs, ... }: {
name = "dnscrypt-proxy";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ joachifm ];
@@ -23,11 +23,13 @@ import ./make-test.nix ({ pkgs, ... }: {
};

testScript = ''
$client->waitForUnit("dnsmasq");
client.wait_for_unit("dnsmasq")
# The daemon is socket activated; sending a single ping should activate it.
$client->fail("systemctl is-active dnscrypt-proxy");
$client->execute("${pkgs.iputils}/bin/ping -c1 example.com");
$client->waitUntilSucceeds("systemctl is-active dnscrypt-proxy");
client.fail("systemctl is-active dnscrypt-proxy")
client.execute(
"${pkgs.iputils}/bin/ping -c1 example.com"
)
client.wait_until_succeeds("systemctl is-active dnscrypt-proxy")
'';
})
22 changes: 12 additions & 10 deletions nixos/tests/docker-edge.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This test runs docker and checks if simple container starts

import ./make-test.nix ({ pkgs, ...} : {
import ./make-test-python.nix ({ pkgs, ...} : {
name = "docker";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ nequissimus offline ];
@@ -31,17 +31,19 @@ import ./make-test.nix ({ pkgs, ...} : {
};

testScript = ''
startAll;
start_all()
$docker->waitForUnit("sockets.target");
$docker->succeed("tar cv --files-from /dev/null | docker import - scratchimg");
$docker->succeed("docker run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10");
$docker->succeed("docker ps | grep sleeping");
$docker->succeed("sudo -u hasprivs docker ps");
$docker->fail("sudo -u noprivs docker ps");
$docker->succeed("docker stop sleeping");
docker.wait_for_unit("sockets.target")
docker.succeed("tar cv --files-from /dev/null | docker import - scratchimg")
docker.succeed(
"docker run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10"
)
docker.succeed("docker ps | grep sleeping")
docker.succeed("sudo -u hasprivs docker ps")
docker.fail("sudo -u noprivs docker ps")
docker.succeed("docker stop sleeping")
# Must match version twice to ensure client and server versions are correct
$docker->succeed('[ $(docker version | grep ${pkgs.docker-edge.version} | wc -l) = "2" ]');
docker.succeed('[ $(docker version | grep ${pkgs.docker-edge.version} | wc -l) = "2" ]')
'';
})
22 changes: 12 additions & 10 deletions nixos/tests/docker.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This test runs docker and checks if simple container starts

import ./make-test.nix ({ pkgs, ...} : {
import ./make-test-python.nix ({ pkgs, ...} : {
name = "docker";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ nequissimus offline ];
@@ -31,17 +31,19 @@ import ./make-test.nix ({ pkgs, ...} : {
};

testScript = ''
startAll;
start_all()
$docker->waitForUnit("sockets.target");
$docker->succeed("tar cv --files-from /dev/null | docker import - scratchimg");
$docker->succeed("docker run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10");
$docker->succeed("docker ps | grep sleeping");
$docker->succeed("sudo -u hasprivs docker ps");
$docker->fail("sudo -u noprivs docker ps");
$docker->succeed("docker stop sleeping");
docker.wait_for_unit("sockets.target")
docker.succeed("tar cv --files-from /dev/null | docker import - scratchimg")
docker.succeed(
"docker run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10"
)
docker.succeed("docker ps | grep sleeping")
docker.succeed("sudo -u hasprivs docker ps")
docker.fail("sudo -u noprivs docker ps")
docker.succeed("docker stop sleeping")
# Must match version twice to ensure client and server versions are correct
$docker->succeed('[ $(docker version | grep ${pkgs.docker.version} | wc -l) = "2" ]');
docker.succeed('[ $(docker version | grep ${pkgs.docker.version} | wc -l) = "2" ]')
'';
})
56 changes: 30 additions & 26 deletions nixos/tests/documize.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, lib, ...} : {
import ./make-test-python.nix ({ pkgs, lib, ...} : {
name = "documize";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ ma27 ];
@@ -29,30 +29,34 @@ import ./make-test.nix ({ pkgs, lib, ...} : {
};

testScript = ''
startAll;
$machine->waitForUnit("documize-server.service");
$machine->waitForOpenPort(3000);
my $dbhash = $machine->succeed("curl -f localhost:3000 "
. " | grep 'property=\"dbhash' "
. " | grep -Po 'content=\"\\K[^\"]*'"
);
chomp($dbhash);
$machine->succeed("curl -X POST "
. "--data 'dbname=documize' "
. "--data 'dbhash=$dbhash' "
. "--data 'title=NixOS' "
. "--data 'message=Docs' "
. "--data 'firstname=John' "
. "--data 'lastname=Doe' "
. "--data 'email=john.doe\@nixos.org' "
. "--data 'password=verysafe' "
. "-f localhost:3000/api/setup"
);
$machine->succeed('test "$(curl -f localhost:3000/api/public/meta | jq ".title" | xargs echo)" = "NixOS"');
start_all()
machine.wait_for_unit("documize-server.service")
machine.wait_for_open_port(3000)
dbhash = machine.succeed(
"curl -f localhost:3000 | grep 'property=\"dbhash' | grep -Po 'content=\"\\K[^\"]*'"
)
dbhash = dbhash.strip()
machine.succeed(
(
"curl -X POST"
" --data 'dbname=documize'"
" --data 'dbhash={}'"
" --data 'title=NixOS'"
" --data 'message=Docs'"
" --data 'firstname=John'"
" --data 'lastname=Doe'"
" --data 'email=john.doe@nixos.org'"
" --data 'password=verysafe'"
" -f localhost:3000/api/setup"
).format(dbhash)
)
machine.succeed(
'test "$(curl -f localhost:3000/api/public/meta | jq ".title" | xargs echo)" = "NixOS"'
)
'';
})
4 changes: 2 additions & 2 deletions pkgs/applications/audio/ncmpc/default.nix
Original file line number Diff line number Diff line change
@@ -3,13 +3,13 @@

stdenv.mkDerivation rec {
pname = "ncmpc";
version = "0.35";
version = "0.36";

src = fetchFromGitHub {
owner = "MusicPlayerDaemon";
repo = "ncmpc";
rev = "v${version}";
sha256 = "0hhc5snxy5fbg47ynz4b7fkmzdy974zxqr0cqc6kh15yvbr25ikh";
sha256 = "1ssmk1p43gjhcqi86sh6b7csqpwwpf3hs32cmnylv6pmbcwbs69h";
};

buildInputs = [ glib ncurses mpd_clientlib boost ];
4 changes: 2 additions & 2 deletions pkgs/applications/blockchains/go-ethereum.nix
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

buildGoPackage rec {
pname = "go-ethereum";
version = "1.9.6";
version = "1.9.7";

goPackagePath = "github.com/ethereum/go-ethereum";

@@ -14,7 +14,7 @@ buildGoPackage rec {
owner = "ethereum";
repo = pname;
rev = "v${version}";
sha256 = "08k6p7mbszlg8mq8k3vi5xrfnhfbxlh2ynd0nr0j64qdhmhcdnq6";
sha256 = "07110dj91wmkpwz7iy0lmxx3y9wjxjrhk3rhkfdil74cxm0wkkn2";
};

meta = with stdenv.lib; {
12 changes: 6 additions & 6 deletions pkgs/applications/editors/android-studio/default.nix
Original file line number Diff line number Diff line change
@@ -13,14 +13,14 @@ let
sha256Hash = "0kcd6kd5rn4b76damkfddin18d1r0dck05piv8mq1ns7x1n4hf7q";
};
betaVersion = {
version = "3.6.0.14"; # "Android Studio 3.6 Beta 2"
build = "192.5947919";
sha256Hash = "09l7mdjkzwnkkcgxp0x66bzm125ignrfssy7n141wvs2rd66i2fs";
version = "3.6.0.15"; # "Android Studio 3.6 Beta 3"
build = "192.5982640";
sha256Hash = "0017g7nvjiadd64in9fl4wq5lf8b7pyrdasbnwzjcphpbzy1390x";
};
latestVersion = { # canary & dev
version = "4.0.0.1"; # "Android Studio 4.0 Canary 1"
build = "192.5959023";
sha256Hash = "1d9hvyk0wnfiip1612ci4sbw58rq93cyy026cx6s33rvjk3cwfrl";
version = "4.0.0.2"; # "Android Studio 4.0 Canary 2"
build = "192.5984562";
sha256Hash = "0p29a6np31396970lnb3di2yrcqi3z8nqcn27hcnb4c4g7kjm0qw";
};
in {
# Attributes are named by their corresponding release channels
6 changes: 3 additions & 3 deletions pkgs/applications/editors/vscode/vscode.nix
Original file line number Diff line number Diff line change
@@ -11,13 +11,13 @@ let
archive_fmt = if system == "x86_64-darwin" then "zip" else "tar.gz";

sha256 = {
x86_64-linux = "0p4ah1bbz0njl2bk783gq5z1gxfzapa65qzhrkn216v07rba29jm";
x86_64-darwin = "162bqdhi2dx74q5f56bhs5phz9az66lb4lvfcj1sdygp51xsb93y";
x86_64-linux = "1jxjf1yg17l61n8qmnh4916426da8asp8p36lfyawxif8m9sx8ag";
x86_64-darwin = "1yxxvqpk849dzbzhdqz0j16f50z4slcx51bkv2svfb36nxdaahl1";
}.${system};
in
callPackage ./generic.nix rec {

version = "1.39.2";
version = "1.40.0";
pname = "vscode";

executableName = "code" + lib.optionalString isInsiders "-insiders";
4 changes: 2 additions & 2 deletions pkgs/applications/networking/cluster/kops/default.nix
Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@ in rec {
};

kops_1_14 = mkKops {
version = "1.14.0";
sha256 = "0zd2plsdn45wf73qspv9yaxa0crwfy5h6ws3lvw96vxvrkhl96l2";
version = "1.14.1";
sha256 = "0ikd8qwrjh8s1sc95g18sm0q6p33swz2m1rjd8zw34mb2w9jv76n";
};
}
6 changes: 3 additions & 3 deletions pkgs/applications/version-management/gitlab/data.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"version": "12.4.1",
"repo_hash": "0dmb8ds6c5paxg35nricaywfhsgmp5rr46kk21hy2hsddgwkyb4k",
"version": "12.4.2",
"repo_hash": "00y8n0y7wydwxq62fyf7hcpx90zz5sw458m2773lz7pdgnpnrdc2",
"owner": "gitlab-org",
"repo": "gitlab",
"rev": "v12.4.1-ee",
"rev": "v12.4.2-ee",
"passthru": {
"GITALY_SERVER_VERSION": "1.67.0",
"GITLAB_PAGES_VERSION": "1.11.0",
2 changes: 1 addition & 1 deletion pkgs/applications/version-management/gitlab/default.nix
Original file line number Diff line number Diff line change
@@ -76,7 +76,7 @@ let
bundle exec rake gettext:po_to_json RAILS_ENV=production NODE_ENV=production
bundle exec rake rake:assets:precompile RAILS_ENV=production NODE_ENV=production
bundle exec rake webpack:compile RAILS_ENV=production NODE_ENV=production NODE_OPTIONS="--max_old_space_size=4096"
bundle exec rake webpack:compile RAILS_ENV=production NODE_ENV=production NODE_OPTIONS="--max_old_space_size=2048"
bundle exec rake gitlab:assets:fix_urls RAILS_ENV=production NODE_ENV=production
runHook postBuild
Original file line number Diff line number Diff line change
@@ -55,7 +55,7 @@ in buildGoPackage rec {
meta = with stdenv.lib; {
homepage = https://gitlab.com/gitlab-org/gitaly;
description = "A Git RPC service for handling all the git calls made by GitLab";
platforms = platforms.unix;
platforms = platforms.linux;
maintainers = with maintainers; [ roblabla globin fpletz ];
license = licenses.mit;
};
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ buildGoPackage rec {
meta = with stdenv.lib; {
description = "SSH access and repository management app for GitLab";
homepage = http://www.gitlab.com/;
platforms = platforms.unix;
platforms = platforms.linux;
maintainers = with maintainers; [ fpletz globin talyz ];
license = licenses.mit;
};
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ buildGoPackage rec {

meta = with stdenv.lib; {
homepage = http://www.gitlab.com/;
platforms = platforms.unix;
platforms = platforms.linux;
maintainers = with maintainers; [ fpletz globin talyz ];
license = licenses.mit;
};
20 changes: 20 additions & 0 deletions pkgs/development/compilers/rust/1_38_0.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import ./default.nix {
rustcVersion = "1.38.0";
rustcSha256 = "101dlpsfkq67p0hbwx4acqq6n90dj4bbprndizpgh1kigk566hk4";

# Note: the version MUST be one version prior to the version we're
# building
bootstrapVersion = "1.37.0";

# fetch hashes by running `print-hashes.sh 1.37.0`
bootstrapHashes = {
i686-unknown-linux-gnu = "74510e0e52a55e65a9f716673c2cda4d2bd427e2453541c6993c77c3ec04acf9";
x86_64-unknown-linux-gnu = "cb573229bfd32928177c3835fdeb62d52da64806b844bc1095c6225b0665a1cb";
armv7-unknown-linux-gnueabihf = "5b87b877f0ed20c6a09ce26e7a15d8c61b26b62484b97e78a51099d0efefec98";
aarch64-unknown-linux-gnu = "263ef98fa3a6b2911b56f89c06615cdebf6ef676eb9b2493ad1539602f79b6ba";
i686-apple-darwin = "e45d0c4d882fc6c404ffa6fe790294f4ea96384a2b48804adbf723f3635477a8";
x86_64-apple-darwin = "b2310c97ffb964f253c4088c8d29865f876a49da2a45305493af5b5c7a3ca73d";
};

selectRustPackage = pkgs: pkgs.rust_1_38_0;
}
20 changes: 20 additions & 0 deletions pkgs/development/compilers/rust/1_39_0.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import ./default.nix {
rustcVersion = "1.39.0";
rustcSha256 = "0mwkc1bnil2cfyf6nglpvbn2y0zfbv44zfhsd5qg4c9rm6vgd8dl";

# Note: the version MUST be one version prior to the version we're
# building
bootstrapVersion = "1.38.0";

# fetch hashes by running `print-hashes.sh 1.38.0`
bootstrapHashes = {
i686-unknown-linux-gnu = "41aed8a350e24a0cac1444ed99b3dd24a90bc581dd88cb420c6e547d6b5f57af";
x86_64-unknown-linux-gnu = "adda26b3f0609dbfbdc2019da4a20101879b9db2134fae322a4e863a069ec221";
armv7-unknown-linux-gnueabihf = "8b1bf1680a61a643d6b5c7a3b1a1ce88448652756395e20ba5846739cbd085c4";
aarch64-unknown-linux-gnu = "06afd6d525326cea95c3aa658aaa8542eab26f44235565bb16913ac9d12b7bda";
i686-apple-darwin = "cdbf2807774bed350a3af6f41d7f7dd7ceff28777cde310c3ba90033188eb2f8";
x86_64-apple-darwin = "bd301b78ddcd5d4553962b115e1dca5436dd3755ed323f86f4485769286a8a5a";
};

selectRustPackage = pkgs: pkgs.rust_1_39_0;
}
16 changes: 1 addition & 15 deletions pkgs/development/compilers/rust/bootstrap.nix
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
{ stdenv, fetchurl, callPackage }:
{ stdenv, fetchurl, callPackage, version, hashes }:

let
# Note: the version MUST be one version prior to the version we're
# building
version = "1.38.0";

# fetch hashes by running `print-hashes.sh 1.38.0`
hashes = {
i686-unknown-linux-gnu = "41aed8a350e24a0cac1444ed99b3dd24a90bc581dd88cb420c6e547d6b5f57af";
x86_64-unknown-linux-gnu = "adda26b3f0609dbfbdc2019da4a20101879b9db2134fae322a4e863a069ec221";
armv7-unknown-linux-gnueabihf = "8b1bf1680a61a643d6b5c7a3b1a1ce88448652756395e20ba5846739cbd085c4";
aarch64-unknown-linux-gnu = "06afd6d525326cea95c3aa658aaa8542eab26f44235565bb16913ac9d12b7bda";
i686-apple-darwin = "cdbf2807774bed350a3af6f41d7f7dd7ceff28777cde310c3ba90033188eb2f8";
x86_64-apple-darwin = "bd301b78ddcd5d4553962b115e1dca5436dd3755ed323f86f4485769286a8a5a";
};

platform =
if stdenv.hostPlatform.system == "i686-linux"
then "i686-unknown-linux-gnu"
18 changes: 15 additions & 3 deletions pkgs/development/compilers/rust/default.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{ rustcVersion
, rustcSha256
, bootstrapVersion
, bootstrapHashes
, selectRustPackage
}:
{ stdenv, lib
, buildPackages
, newScope, callPackage
@@ -36,21 +42,27 @@
# cycles / purify builds). In this way, nixpkgs would be in control of all
# bootstrapping.
packages = {
prebuilt = callPackage ./bootstrap.nix {};
prebuilt = callPackage ./bootstrap.nix {
version = bootstrapVersion;
hashes = bootstrapHashes;
};
stable = lib.makeScope newScope (self: let
# Like `buildRustPackages`, but may also contain prebuilt binaries to
# break cycle. Just like `bootstrapTools` for nixpkgs as a whole,
# nothing in the final package set should refer to this.
bootstrapRustPackages = self.buildRustPackages.overrideScope' (_: _:
lib.optionalAttrs (stdenv.buildPlatform == stdenv.hostPlatform)
buildPackages.rust.packages.prebuilt);
(selectRustPackage buildPackages).packages.prebuilt);
bootRustPlatform = makeRustPlatform bootstrapRustPackages;
in {
# Packages suitable for build-time, e.g. `build.rs`-type stuff.
buildRustPackages = buildPackages.rust.packages.stable;
buildRustPackages = (selectRustPackage buildPackages).packages.stable;
# Analogous to stdenv
rustPlatform = makeRustPlatform self.buildRustPackages;
rustc = self.callPackage ./rustc.nix ({
version = rustcVersion;
sha256 = rustcSha256;

# Use boot package set to break cycle
rustPlatform = bootRustPlatform;
} // lib.optionalAttrs (stdenv.cc.isClang && stdenv.hostPlatform == stdenv.buildPlatform) {
6 changes: 4 additions & 2 deletions pkgs/development/compilers/rust/rustc.nix
Original file line number Diff line number Diff line change
@@ -4,6 +4,8 @@
, pkgconfig, openssl
, which, libffi
, withBundledLLVM ? false
, version
, sha256
}:

let
@@ -18,11 +20,11 @@ let
llvmShared = llvm_7.override { enableSharedLibraries = true; };
in stdenv.mkDerivation rec {
pname = "rustc";
version = "1.39.0";
inherit version;

src = fetchurl {
url = "https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz";
sha256 = "0mwkc1bnil2cfyf6nglpvbn2y0zfbv44zfhsd5qg4c9rm6vgd8dl";
inherit sha256;
};

__darwinAllowLocalNetworking = true;
35 changes: 0 additions & 35 deletions pkgs/development/python-modules/neurotools/default.nix

This file was deleted.

55 changes: 52 additions & 3 deletions pkgs/misc/vscode-extensions/default.nix
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ in
mktplcRef = {
name = "latex-workshop";
publisher = "James-Yu";
version = "8.2.0";
version = "8.2.0";
sha256 = "1ai16aam4v5jzhxgms589q0l24kyk1a9in6z4i7g05b3sahyxab2";
};
meta = with stdenv.lib; {
@@ -84,12 +84,61 @@ in
};
};

ms-azuretools.vscode-docker = buildVscodeMarketplaceExtension {
mktplcRef = {
name = "vscode-docker";
publisher = "ms-azuretools";
version = "0.8.1";
sha256 = "0n59whmcrx8946xix6skvc50f2vsc85ckvn8cs06w9mqmymm1q0s";
};
meta = {
license = stdenv.lib.licenses.mit;
};
};

ms-kubernetes-tools.vscode-kubernetes-tools = buildVscodeMarketplaceExtension {
mktplcRef = {
name = "vscode-kubernetes-tools";
publisher = "ms-kubernetes-tools";
version = "1.0.6";
sha256 = "12a4phl1pddsajy3n0ld6rp607iy0pif6pqrs6ljbg2x97fyra28";
};
meta = {
license = stdenv.lib.licenses.mit;
};
};

ms-vscode.Go = buildVscodeMarketplaceExtension {
mktplcRef = {
name = "Go";
publisher = "ms-vscode";
version = "0.11.7";
sha256 = "1l6jjdfivw1pn9y4d4i7zf80ls1k1b0ap1d828ah57ad3bgmyqfi";
};
meta = {
license = stdenv.lib.licenses.mit;
};
};

ms-vscode.cpptools = callPackage ./cpptools {};

ms-python.python = callPackage ./python {
extractNuGet = callPackage ./python/extract-nuget.nix { };
};

redhat.vscode-yaml = buildVscodeMarketplaceExtension {
mktplcRef = {
name = "vscode-yaml";
publisher = "redhat";
version = "0.5.3";
sha256 = "03swlsp906rqlrx6jf3ibh7pk36sm0zdr8jfy6sr3w5lqjg27gka";
};
meta = {
license = stdenv.lib.licenses.mit;
};
};


skyapps.fish-vscode = buildVscodeMarketplaceExtension {
mktplcRef = {
name = "fish-vscode";
@@ -106,8 +155,8 @@ in
mktplcRef = {
name = "vim";
publisher = "vscodevim";
version = "1.3.0";
sha256 = "18z24w7smjjnv945f8qyy6dl95xckyqa6gg3gijfcigvq5sgyawc";
version = "1.11.3";
sha256 = "1smzsgcrkhghbnpy51gp28kh74l7y4s2m8pfxabb4ffb751254j0";
};
meta = {
license = stdenv.lib.licenses.mit;
13 changes: 11 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -8523,10 +8523,18 @@ in
inherit (darwin) apple_sdk;
};

rust = callPackage ../development/compilers/rust {
rust_1_39_0 = callPackage ../development/compilers/rust/1_39_0.nix {
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
};
rustPackages = rust.packages.stable;
rust_1_38_0 = callPackage ../development/compilers/rust/1_38_0.nix {
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
};
rust = rust_1_39_0;

rustPackages_1_39_0 = rust_1_39_0.packages.stable;
rustPackages_1_38_0 = rust_1_38_0.packages.stable;
rustPackages = rustPackages_1_39_0;

inherit (rustPackages) cargo rustc rustPlatform;
inherit (rust) makeRustPlatform;

@@ -21283,6 +21291,7 @@ in

thunderbird = callPackage ../applications/networking/mailreaders/thunderbird {
inherit (gnome2) libIDL;
inherit (rustPackages_1_38_0) cargo rustc;
libpng = libpng_apng;
enableGTK3 = true;
};
2 changes: 0 additions & 2 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
@@ -2243,8 +2243,6 @@ in {

howdoi = callPackage ../development/python-modules/howdoi {};

neurotools = callPackage ../development/python-modules/neurotools {};

jdatetime = callPackage ../development/python-modules/jdatetime {};

daphne = callPackage ../development/python-modules/daphne { };