BurntSushi / erd

Translates a plain text description of a relational database schema to a graphical entity-relationship diagram.
The Unlicense
1.81k stars 156 forks source link

./build-static_by-nix.sh doesn't work #90

Open noteed opened 3 years ago

noteed commented 3 years ago

I guess this is because of this: https://github.com/nh2/static-haskell-nix/issues/95

For the record, the problem looks like:

$ ./build-static_by-nix.sh 
+ /nix/store/4jl99687r2r5xdxis5g93v7cy5rmzrjb-stack2nix-0.2.3/bin/stack2nix /home/thu/projects/erd --stack-yaml stack.yaml --hackage-snapshot 2019-11-10T00:00:00Z -o /tmp/stack2nix-output-dir.r7OH7G2Zfd/stack2nix-output.nix
Ensuring git version is >= 2 ...
Ensuring cabal version is >= 2 ...
stack2nix: RedownloadInvalidResponse Request {
  host                 = "raw.githubusercontent.com"
  port                 = 443
  secure               = True
  requestHeaders       = []
  path                 = "/fpco/lts-haskell/master//lts-16.0.yaml"
  queryString          = ""
  method               = "GET"
  proxy                = Nothing
  rawBody              = False
  redirectCount        = 10
  responseTimeout      = ResponseTimeoutDefault
  requestVersion       = HTTP/1.1
}
 "/home/thu/.stack/build-plan/lts-16.0.yaml" (Response {responseStatus = Status {statusCode = 404, statusMessage = "Not Found"}, responseVersion = HTTP/1.1, responseHeaders = [("Connection","keep-alive"),("Content-Length","14"),("Content-Security-Policy","default-src 'none'; style-src 'unsafe-inline'; sandbox"),("Strict-Transport-Security","max-age=31536000"),("X-Content-Type-Options","nosniff"),("X-Frame-Options","deny"),("X-XSS-Protection","1; mode=block"),("Content-Type","text/plain; charset=utf-8"),("X-GitHub-Request-Id","B474:46F0:277EF:345D2:6031156E"),("Accept-Ranges","bytes"),("Date","Sat, 20 Feb 2021 13:58:06 GMT"),("Via","1.1 varnish"),("X-Served-By","cache-ams21053-AMS"),("X-Cache","MISS"),("X-Cache-Hits","0"),("X-Timer","S1613829487.654591,VS0,VE189"),("Vary","Authorization,Accept-Encoding"),("Access-Control-Allow-Origin","*"),("X-Fastly-Request-ID","aa6e14f2c09939438af93bee96f7be59b974b1e7"),("Expires","Sat, 20 Feb 2021 14:03:06 GMT"),("Source-Age","0")], responseBody = (), responseCookieJar = CJ {expose = []}, responseClose' = ResponseClose})
cp: cannot stat '/bin/erd': No such file or directory

Note that the Dockerfile builds fine.

ddacunha commented 3 years ago

If like me you installed stack via apt install you are likely getting an old version (this is not happening inside the docker).

$ stack --version
1.9.3.1 x86_64

At the time of writing the latest is 2.7.1, you need to do a stack upgrade