I am trying to learn nix package manager and I wanted to build a flask app using nix package manager using --pure
especially. When I run nix-shell --pure default.nix
, I get the error syntax error, unexpected $end, expecting ';', at /Users/USER/Desktop/NixRank/flask-hello/default.nix:23:2
where line 23 corresponds to closing curly braces. I assume the error message is somehow is not helpful and any help is highly appreciated :)
here is my default.nix
let
name = "learnnix";
src= ./.;
version = "0.1";
pkgs=import<nixpkgs>{allowUnfree=true;};
in
with pkgs
stdenv.mkDerivation{
name = "${name}";
inherit src;
buildInputs = [
bash
python3
python38Packages.flask
];
buildPhase = ''
flask run
'';
installPhase =''
open "http://localhost:5000/"
'';
}
Solved! the problem was on the line with with pkgs
where semicolon was missing. Error message was not helpful in this case. I opt for leaving the post here so maybe someone can benefit later on.