mirror of
https://github.com/justinwoo/easy-dhall-nix.git
synced 2024-11-23 11:39:42 +01:00
Merge pull request #7 from justinwoo/workflow
use github actions workflow
This commit is contained in:
commit
0930101f28
7 changed files with 21 additions and 42 deletions
19
.github/workflows/ci.yml
vendored
Normal file
19
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
name: My Workflow
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
my_job:
|
||||||
|
name: My Job on ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
- name: nix
|
||||||
|
run: |
|
||||||
|
curl https://nixos.org/nix/install | sh
|
||||||
|
. "$HOME"/.nix-profile/etc/profile.d/nix.sh
|
||||||
|
./test.bash
|
|
@ -1,4 +0,0 @@
|
||||||
sudo: required
|
|
||||||
dist: trusty
|
|
||||||
language: nix
|
|
||||||
script: make
|
|
4
Makefile
4
Makefile
|
@ -1,4 +0,0 @@
|
||||||
default: test
|
|
||||||
|
|
||||||
test:
|
|
||||||
nix-shell --pure --run './test.bash'
|
|
|
@ -1,7 +1,5 @@
|
||||||
# Easy Dhall Nix
|
# Easy Dhall Nix
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.org/justinwoo/easy-dhall-nix.svg?branch=master)](https://travis-ci.org/justinwoo/easy-dhall-nix)
|
|
||||||
|
|
||||||
Derivations for easily downloading Dhall binaries and putting them to use.
|
Derivations for easily downloading Dhall binaries and putting them to use.
|
||||||
|
|
||||||
## Trial
|
## Trial
|
||||||
|
|
|
@ -3,7 +3,5 @@
|
||||||
{
|
{
|
||||||
dhall-simple = import ./dhall-simple.nix { inherit pkgs; };
|
dhall-simple = import ./dhall-simple.nix { inherit pkgs; };
|
||||||
|
|
||||||
dhall-json-simple = import ./dhall-json-simple.nix { inherit pkgs; };
|
|
||||||
|
|
||||||
dhall-bash-simple = import ./dhall-bash-simple.nix { inherit pkgs; };
|
dhall-bash-simple = import ./dhall-bash-simple.nix { inherit pkgs; };
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
{ pkgs ? import <nixpkgs> {} }:
|
|
||||||
|
|
||||||
pkgs.stdenv.mkDerivation rec {
|
|
||||||
name = "dhall-json-simple";
|
|
||||||
|
|
||||||
src = if pkgs.stdenv.isDarwin
|
|
||||||
then pkgs.fetchurl {
|
|
||||||
url = "https://github.com/dhall-lang/dhall-haskell/releases/download/1.25.0/dhall-json-1.4.0-x86_64-macos.tar.bz2";
|
|
||||||
sha256 = "0427xy59mzyrz978l36x0ha610bpckg14m3svkvg8hipvblgh19r";
|
|
||||||
}
|
|
||||||
else pkgs.fetchurl {
|
|
||||||
url = "https://github.com/dhall-lang/dhall-haskell/releases/download/1.25.0/dhall-json-1.4.0-x86_64-linux.tar.bz2";
|
|
||||||
sha256 = "14apqq0dj3lmm8yccygf8bb27scxjfkjkmr8zgnwb98znr51gfwn";
|
|
||||||
};
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
DHALL_TO_JSON=$out/bin/dhall-to-json
|
|
||||||
DHALL_TO_YAML=$out/bin/dhall-to-yaml
|
|
||||||
install -D -m555 -T dhall-to-json $DHALL_TO_JSON
|
|
||||||
install -D -m555 -T dhall-to-yaml $DHALL_TO_YAML
|
|
||||||
|
|
||||||
mkdir -p $out/etc/bash_completion.d/
|
|
||||||
$DHALL_TO_JSON --bash-completion-script $DHALL_TO_JSON > $out/etc/bash_completion.d/dhall-to-json-completion.bash
|
|
||||||
$DHALL_TO_YAML --bash-completion-script $DHALL_TO_YAML > $out/etc/bash_completion.d/dhall-to-yaml-completion.bash
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env nix-shell
|
||||||
|
#!nix-shell -i bash
|
||||||
|
|
||||||
ERRORS=0;
|
ERRORS=0;
|
||||||
|
|
||||||
|
@ -14,8 +15,6 @@ function test_exe () {
|
||||||
}
|
}
|
||||||
|
|
||||||
test_exe dhall;
|
test_exe dhall;
|
||||||
test_exe dhall-to-json;
|
|
||||||
test_exe dhall-to-yaml;
|
|
||||||
test_exe dhall-to-bash;
|
test_exe dhall-to-bash;
|
||||||
|
|
||||||
exit $ERRORS;
|
exit $ERRORS;
|
||||||
|
|
Loading…
Reference in a new issue