From 78c235875c7b7ce9f1b13a0789f7390a39020d83 Mon Sep 17 00:00:00 2001 From: Suzanne Soy Date: Sun, 21 Feb 2021 20:21:25 +0000 Subject: [PATCH] install sha256sum with the option --zero using Nix --- .github/workflows/ci.yml | 9 ++++++++- flake.lock | 22 ++++++++++++++++++++++ flake.nix | 20 ++++++++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0fd7591..0a37828 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,5 +12,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: cachix/install-nix-action@v12 + with: + install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20201221_9fab14a/install + extra_nix_config: | + experimental-features = nix-command flakes + - name: build dependencies + run: nix build path://$PWD/ - name: Run tests - run: ./test.py + run: PATH="$PWD/result/bin:$PATH" ./test.py diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..8b67cbe --- /dev/null +++ b/flake.lock @@ -0,0 +1,22 @@ +{ + "nodes": { + "nixpkgs-git": { + "locked": { + "narHash": "sha256-wLDweKqbmufa2wonCKBf4Wfl8I0eS1CGS7WdR5tPHKo=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/60330b60655b3fa3a18624bdd7069855bb37af99.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/60330b60655b3fa3a18624bdd7069855bb37af99.tar.gz" + } + }, + "root": { + "inputs": { + "nixpkgs-git": "nixpkgs-git" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..3c2ae6d --- /dev/null +++ b/flake.nix @@ -0,0 +1,20 @@ +{ + description = ""; + inputs = { + nixpkgs-git.url = https://github.com/NixOS/nixpkgs/archive/60330b60655b3fa3a18624bdd7069855bb37af99.tar.gz; # was: 62ef779f2a5050549772722665bedf52f01268d2 + }; + outputs = { nixpkgs-git, ... }@inputs : { + defaultPackage.x86_64-linux = + let system = "x86_64-linux"; in + let nixpkgs = import nixpkgs-git { config = { allowUnfree = true;}; system = system; }; in + + let mypackages = with nixpkgs; [ coreutils ]; in + + with import nixpkgs-git { system = "x86_64-linux"; }; + symlinkJoin { + name = "mypackages"; + paths = lib.lists.unique mypackages; + postBuild = ''echo "links created"''; + }; + }; +}