on hpack-skeleton help sign in
obelisk/release.nix
44 lines 924 B history raw
1{ self ? import ./. {}
2, pkgs ? self.nixpkgs
3}:
5with pkgs;
7{
8 inherit (self) command;
9 built-skeleton = (import ./skeleton {}).all;
10 tests = {
11 #TODO: Doesn't work; see discussion in https://www.pivotaltracker.com/story/show/157265140
12 # ob-init = runCommand "ob-init" {
13 # nativeBuildInputs = [
14 # self.command
15 # nix
16 # ];
17 # } ''
18 # # mkdir $out
19 # # cd $out
20 # # ob init --symlink=${self.path}
21 #'';
23 verify-migration = runCommand "verify-migration" {
24 nativeBuildInputs = [
25 self.command
26 nix # obelisk uses `nix-hash`
27 ];
28 } ''
29 set -e
30 # Fix permissions so `removePathForcibly` works on copied-to-tmp paths
31 cp -a ${self.pathGit} $TMPDIR/obelisk
32 cd $TMPDIR/obelisk
33 chmod -R u+w .
35 (set -x;
36 ob internal hash;
37 ob internal verify-migration;
38 )
40 mkdir -p $out
41 touch $out/done
42 '';
43 };