Skip to content

Commit

Permalink
add nix
Browse files Browse the repository at this point in the history
  • Loading branch information
stoeffel committed Oct 20, 2023
1 parent 47ae32d commit 8ffc2b6
Show file tree
Hide file tree
Showing 7 changed files with 258 additions and 1,629 deletions.
27 changes: 27 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
build:
elm make src/VerifyExamples.elm --output bin/elm.js --optimize

verify-own-docs: build
./bin/cli.js

test: verify-own-docs
./run-tests.sh

watch:
watchexec \
--clear \
--restart \
--watch src \
--watch example/src \
--watch elm.json \
"make test"


release-major: test
npx xyz --repo git@github.com:stoeffel/elm-verify-examples.git --increment major

release-minor: test
npx xyz --repo git@github.com:stoeffel/elm-verify-examples.git --increment minor

release-patch: test
npx xyz --repo git@github.com:stoeffel/elm-verify-examples.git --increment patch
13 changes: 6 additions & 7 deletions example/src/Failing.elm
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
module Failing
exposing
( noExample
, nope
)
module Failing exposing
( noExample
, nope
)

{-| -}


{-|
nope --> 2
nope --> 3
-}
nope =
3
2


noExample =
Expand Down
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; };
in {
devShells = {
default = pkgs.mkShell {
buildInputs = [
pkgs.elmPackages.elm
pkgs.gnumake
pkgs.nodejs-19_x
pkgs.watchexec
];
};
};
});
}
Loading

0 comments on commit 8ffc2b6

Please sign in to comment.