-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error trying to follow steps for parcel #49
Comments
+1 Did you ever figure out how to do this with parcel? Would love to hear a solution -- trying to solve this now myself. |
Here's an example of how to get a build with the current versions of parcel and yarn2nix: {
description = "A very basic flake";
outputs = { self, nixpkgs }: {
# A dev shell to use elm2nix
devShells.aarch64-linux.default =
let pkgs = nixpkgs.legacyPackages.aarch64-linux;
in pkgs.mkShell {
packages = [ pkgs.elm2nix ];
};
packages.aarch64-linux.default =
let
pkgs = nixpkgs.legacyPackages.aarch64-linux;
yarnPkg = pkgs.mkYarnPackage {
name = "myproject-node-packages";
src = pkgs.lib.cleanSourceWith {
src = ./.;
name = "myproject-node-packages.json";
filter = name: type: baseNameOf (toString name) == "package.json";
};
yarnLock = ./yarn.lock;
publishBinsFor = ["parcel"];
};
in pkgs.stdenv.mkDerivation {
name = "myproject-frontend";
src = pkgs.lib.cleanSource ./.;
buildInputs = with pkgs.elmPackages; [
elm
elm-format
yarnPkg
pkgs.yarn
];
patchPhase = ''
rm -rf elm-stuff
ln -sf ${yarnPkg}/node_modules .
'';
shellHook = ''
ln -fs ${yarnPkg}/node_modules .
'';
configurePhase = pkgs.elmPackages.fetchElmDeps {
elmPackages = import ./elm-srcs.nix;
elmVersion = "0.19.1";
registryDat = ./registry.dat;
};
installPhase = ''
mkdir -p $out
parcel build index.html --dist-dir $out
'';
};
};
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a barebones elm app I'm trying to build with parcel using the steps in the readme here. I had to update the fetchElmDeps attributes as the readme was outdated.
I then followed the steps at https://blog.hercules-ci.com/elm/2019/01/03/elm2nix-0.1/ to generate
elm-srcs.nix
,registry.dat
andversions.dat
. (The new fetchElmDeps doesn't seem to requireversions.dat
, is that just no longer used?)But running
nix build
throws an error during the configurePhase:The text was updated successfully, but these errors were encountered: