mirror of
https://github.com/nix-community/naersk
synced 2024-11-26 05:20:18 +00:00
Add script/test
This commit is contained in:
parent
cfcc58495d
commit
2c6c9ddc46
4 changed files with 24 additions and 2 deletions
|
@ -38,7 +38,7 @@ jobs:
|
|||
|
||||
- run:
|
||||
name: Nix build
|
||||
command: nix-build --sandbox --no-link --cores 0 ./test.nix
|
||||
command: ./script/test
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
|
|
4
nix/default.nix
Normal file
4
nix/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ system ? builtins.currentSystem }:
|
||||
let
|
||||
sources = import ./sources.nix;
|
||||
in import sources.nixpkgs { inherit system; }
|
18
script/test
Executable file
18
script/test
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash
|
||||
#!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
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
export NIX_PATH="nixpkgs=./nix"
|
||||
|
||||
echo "Building"
|
||||
|
||||
# Build and create a root
|
||||
nix-build ./test.nix --sandbox --no-link --max-jobs 10
|
||||
|
||||
echo "all good"
|
2
test.nix
2
test.nix
|
@ -1,7 +1,7 @@
|
|||
{ system ? builtins.currentSystem }:
|
||||
let
|
||||
sources = import ./nix/sources.nix;
|
||||
pkgs = import sources.nixpkgs { inherit system; };
|
||||
pkgs = import ./nix { inherit system; };
|
||||
naersk = pkgs.callPackage ./default.nix
|
||||
{ inherit (pkgs.rustPackages) cargo rustc; };
|
||||
builtinz = builtins // pkgs.callPackage ./builtins {};
|
||||
|
|
Loading…
Reference in a new issue