reflex-frp / reflex-platform

A curated package set and set of tools that let you build Haskell packages so they can run on a variety of platforms. reflex-platform is built on top of the nix package manager.
https://reflex-frp.org
BSD 3-Clause "New" or "Revised" License
720 stars 164 forks source link

work-on fails for basic cabal package #67

Closed lally closed 8 years ago

lally commented 8 years ago

Hi, I'm trying to get a basic cabal package together as a starting point for reflex. I get this, but don't know what JSON string it's looking for.

[07/12 16:48::lally@lstp2 triage-tree]$ ~/src/reflex-platform/work-on ghcjs ~/src/triage-tree --show-trace If you have any trouble with this script, please submit an issue at https://github.com/reflex-frp/reflex-platform/issues error: while evaluating ‘workOn’ at /home/lally/src/reflex-platform/default.nix:459:12, called from (string):1:60: while evaluating ‘overrideCabal’ at /home/lally/src/reflex-platform/default.nix:16:26, called from /home/lally/src/reflex-platform/default.nix:459:22: while evaluating ‘callPackage’ at /nix/store/jx3010a6vijaq875sl8r8ar50584rd3w-2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/pkgs/development/haskell-modules/default.nix:47:26, called from (string):1:73: while evaluating ‘callPackageWithScope’ at /nix/store/jx3010a6vijaq875sl8r8ar50584rd3w-2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/pkgs/development/haskell-modules/default.nix:41:42, called from /nix/store/jx3010a6vijaq875sl8r8ar50584rd3w-2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/pkgs/development/haskell-modules/default.nix:47:32: while evaluating ‘callPackageWith’ at /nix/store/2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/lib/customisation.nix:93:35, called from /nix/store/jx3010a6vijaq875sl8r8ar50584rd3w-2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/pkgs/development/haskell-modules/default.nix:41:49: while evaluating ‘makeOverridable’ at /nix/store/2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/lib/customisation.nix:54:24, called from /nix/store/2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/lib/customisation.nix:97:8: while evaluating anonymous function at /home/lally/src/triage-tree/default.nix:1:1, called from /nix/store/2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/lib/customisation.nix:56:12: while evaluating anonymous function at /nix/store/jx3010a6vijaq875sl8r8ar50584rd3w-2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/pkgs/development/haskell-modules/generic-builder.nix:5:1, called from /home/lally/src/triage-tree/default.nix:4:1: while evaluating ‘optionals’ at /nix/store/2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/lib/lists.nix:196:21, called from /nix/store/jx3010a6vijaq875sl8r8ar50584rd3w-2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/pkgs/development/haskell-modules/generic-builder.nix:120:25: while evaluating ‘versionOlder’ at /nix/store/2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/lib/strings.nix:338:22, called from /nix/store/jx3010a6vijaq875sl8r8ar50584rd3w-2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/pkgs/development/haskell-modules/generic-builder.nix:15:13: while evaluating the attribute ‘ghc’ at /nix/store/jx3010a6vijaq875sl8r8ar50584rd3w-2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/pkgs/development/haskell-modules/default.nix:68:9: while evaluating ‘overrideCabal’ at /home/lally/src/reflex-platform/default.nix:16:26, called from /home/lally/src/reflex-platform/default.nix:384:19: while evaluating ‘callPackage’ at /nix/store/2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/pkgs/development/haskell-modules/default.nix:47:26, called from /home/lally/src/reflex-platform/default.nix:384:34: while evaluating ‘callPackageWithScope’ at /nix/store/2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/pkgs/development/haskell-modules/default.nix:41:42, called from /nix/store/2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/pkgs/development/haskell-modules/default.nix:47:32: while evaluating ‘callPackageWith’ at /nix/store/2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/lib/customisation.nix:93:35, called from /nix/store/2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/pkgs/development/haskell-modules/default.nix:41:49: while evaluating ‘makeOverridable’ at /nix/store/2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/lib/customisation.nix:54:24, called from /nix/store/2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/lib/customisation.nix:97:8: while evaluating anonymous function at /nix/store/jx3010a6vijaq875sl8r8ar50584rd3w-2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/pkgs/development/compilers/ghcjs/default.nix:1:1, called from /nix/store/2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/lib/customisation.nix:56:12: while evaluating anonymous function at /nix/store/2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/pkgs/development/haskell-modules/generic-builder.nix:5:1, called from /nix/store/jx3010a6vijaq875sl8r8ar50584rd3w-2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/pkgs/development/compilers/ghcjs/default.nix:57:4: while evaluating ‘optionalAttrs’ at /nix/store/2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/lib/attrsets.nix:316:25, called from /nix/store/2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/pkgs/development/haskell-modules/generic-builder.nix:317:4: while evaluating the derivation attribute ‘name’ at /nix/store/2m2xcca3a0wdylfnjb5f1a2ph73zp3dk-nixpkgs-channels-5bb0aa3/pkgs/build-support/trivial-builders.nix:10:14: expected JSON string It looks like a problem occurred. Please submit an issue at https://github.com/reflex-frp/reflex-platform/issues - include /home/lally/src/reflex-platform/work-on.log to provide more information

The work-on.log:

[nix-shell:~/src/reflex-platform]$ cat work-on.log Command: /home/lally/src/reflex-platform/work-on ghcjs /home/lally/src/triage-tree --show-trace If you have any trouble with this script, please submit an issue at https://github.com/reflex-frp/reflex-platform/issues

[nix-shell:~/src/reflex-platform]$

lally commented 8 years ago

Ok, I sorted this out partially.

The problem is that I ran update, and it overwrote the various .json files with non-json.

nix-prefetch-git doesn't put out json, it puts out:

if test -n "$hash"; then
    echo "{"
    echo "  url = \"$url\";"
    echo "  rev = \"$fullRev\";"
    echo "  $hashType = \"$hash\";"
    echo "}"
fi

(quoting from /nix/store/hlm20i19xij48v7yqxh1by731xvgxf3i-nix-prefetch-git/bin/.nix-prefetch-git-wrapped).

Which breaks.

lally commented 8 years ago

Separately:

-> % ./work-on ghcjs ../triage-tree ~/src/reflex-platform If you have any trouble with this script, please submit an issue at https://github.com/reflex-frp/reflex-platform/issues these derivations will be built: /nix/store/jdd149gsjl5iy5hzmrrfc736cxjksa07-ghcjs-0.2.0.drv building path(s) ‘/nix/store/mrap2l4bhrzmjkvkihxx9y2pvy7jy323-ghcjs-0.2.0’ created 62 symlinks in user environment ghcjs-pkg-0.2.0-7.10.3: /nix/store/mrap2l4bhrzmjkvkihxx9y2pvy7jy323-ghcjs-0.2.0/lib/ghcjs-0.2.0/package.conf.d/package.cache: you don't have permission to modify this file builder for ‘/nix/store/jdd149gsjl5iy5hzmrrfc736cxjksa07-ghcjs-0.2.0.drv’ failed with exit code 1 error: build of ‘/nix/store/jdd149gsjl5iy5hzmrrfc736cxjksa07-ghcjs-0.2.0.drv’ failed /run/current-system/sw/bin/nix-shell: failed to build all dependencies It looks like a problem occurred. Please submit an issue at https://github.com/reflex-frp/reflex-platform/issues - include ./work-on.log to provide more information

lally commented 8 years ago

Separately:

-> % ./work-on ghcjs ../triage-tree ~/src/reflex-platform If you have any trouble with this script, please submit an issue at https://github.com/reflex-frp/reflex-platform/issues these derivations will be built: /nix/store/jdd149gsjl5iy5hzmrrfc736cxjksa07-ghcjs-0.2.0.drv building path(s) ‘/nix/store/mrap2l4bhrzmjkvkihxx9y2pvy7jy323-ghcjs-0.2.0’ created 62 symlinks in user environment ghcjs-pkg-0.2.0-7.10.3: /nix/store/mrap2l4bhrzmjkvkihxx9y2pvy7jy323-ghcjs-0.2.0/lib/ghcjs-0.2.0/package.conf.d/package.cache: you don't have permission to modify this file builder for ‘/nix/store/jdd149gsjl5iy5hzmrrfc736cxjksa07-ghcjs-0.2.0.drv’ failed with exit code 1 error: build of ‘/nix/store/jdd149gsjl5iy5hzmrrfc736cxjksa07-ghcjs-0.2.0.drv’ failed /run/current-system/sw/bin/nix-shell: failed to build all dependencies It looks like a problem occurred. Please submit an issue at https://github.com/reflex-frp/reflex-platform/issues - include ./work-on.log to provide more information

lally commented 8 years ago

Closing, looks like a bunch of weird heisenissues that cleared up after talking on #reflex-frp