Use niv out of nixpkgs (#195)

* Use `niv` out of `nixpkgs`
* Update CI tests and add one for Nix formatting
This commit is contained in:
Connor Prussin 2022-05-04 23:33:37 -07:00 committed by GitHub
parent 42bf4475e0
commit 2286472305
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 13 deletions

View File

@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out codebase
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install nix
uses: cachix/install-nix-action@v15
@ -28,11 +28,11 @@ jobs:
- name: Test
run: nix-shell --run check-code
Validate_Format:
Validate_Purescript_Format:
runs-on: ubuntu-latest
steps:
- name: Check out codebase
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install nix
uses: cachix/install-nix-action@v15
@ -43,13 +43,30 @@ jobs:
run: nix-shell
- name: Validate Format
run: nix-shell --run check-format
run: nix-shell --run check-format-purescript
Validate_Nix_Format:
runs-on: ubuntu-latest
steps:
- name: Check out codebase
uses: actions/checkout@v3
- name: Install nix
uses: cachix/install-nix-action@v15
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Install environment
run: nix-shell
- name: Validate Format
run: nix-shell --run check-format-nix
Validate_Pulp:
runs-on: ubuntu-latest
steps:
- name: Check out codebase
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install nix
uses: cachix/install-nix-action@v15

View File

@ -2,13 +2,12 @@
sources ? import ./sources.nix,
nixpkgs ? sources.nixpkgs,
easy-purescript-nix ? sources.easy-purescript-nix,
niv ? sources.niv,
alejandra ? sources.alejandra,
}: let
niv-overlay = self: _: {
niv-overlay = self: super: {
niv = self.symlinkJoin {
name = "niv";
paths = [niv];
paths = [super.niv];
buildInputs = [self.makeWrapper];
postBuild = ''
wrapProgram $out/bin/niv \

View File

@ -3,9 +3,7 @@ let
url = "https://github.com/nmattia/niv/tarball/df49d53b71ad5b6b5847b32e5254924d60703c46";
sha256 = "1j5p8mi1wi3pdcq0lfb881p97i232si07nb605dl92cjwnira88c";
};
sources = import "${nivSrc}/nix/sources.nix" {
sourcesFile = ./sources.json;
};
niv = import nivSrc {};
in
niv // sources
import "${nivSrc}/nix/sources.nix" {
sourcesFile = ./sources.json;
}