Skip to content

Instantly share code, notes, and snippets.

View zeta-00's full-sized avatar

zeta zeta-00

View GitHub Profile
@zeta-00
zeta-00 / shell.nix
Created November 7, 2021 02:04
Trying to get poetry working with nix:
# Paste in terminal:
# echo "use nix" >> .envrc
# direnv allow
# direnv deny (to disable direnv)
{ pkgs ? import <nixpkgs> {} }:
let
pythonEnv = pkgs.python38.withPackages (ps: with ps;
src/hscurl.c:3:10: error:
fatal error: curl/curl.h: No such file or directory
#include <curl/curl.h>
^~~~~~~~~~~~~
|
3 | #include <curl/curl.h>
| ^
compilation terminated.
`cc' failed in phase `C Compiler'. (Exit code: 1)
let
cabal2nix_file = import ./darcs.nix {};
pkgs = import <nixpkgs> { };
compilerVersion = "ghc865";
compiler = pkgs.haskell.packages."${compilerVersion}";
in
compiler.developPackage {
root = ./.;
# source-overrides = {};
modifier = drv:
[zeta@nixos:/darcs-2.14.2]$ ls -a
. contrib darcs.cabal GNUmakefile release tests
.. COPYING darcs.nix harness Setup.hs
CHANGELOG darcs default.nix README.md src
[zeta@nixos:/darcs-2.14.2]$ nix-shell
building '/nix/store/rxv4ljil69k3rh8fbb8p3sxhgvcq2yvj-cabal2nix-darcs-2.14.2.drv'...
installing
error: creating directory '/nix/var': Permission denied
error: creating directory '/nix/var': Permission denied
src/hscurl.c:3:10: error:
fatal error: curl/curl.h: No such file or directory
#include <curl/curl.h>
^~~~~~~~~~~~~
|
3 | #include <curl/curl.h>
| ^
compilation terminated.
`cc' failed in phase `C Compiler'. (Exit code: 1)
<!DOCTYPE html>
<html>
<body>
<script type="text/javascript">
<!--
var age = 21;
if (age > 18)
{
document.write("<b>old enough to drive</b>")
[zeta@nixos:/~]$ xrandr -q | grep connected
eDP-1 connected primary 3200x1800+0+0 (normal left inverted right x axis y axis) 293mm x 165mm
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
HDMI-2 connected (normal left inverted right x axis y axis)
[zeta@nixos:/~]$
[zeta@nixos:/screened]$ echo "cradle: {cabal: {}} > hie.yaml"
cradle: {cabal: {}} > hie.yaml
[zeta@nixos:/Commands]$ ghcide Rollback.hs
ghcide version: 0.1.0 (GHC: 8.6.5) (PATH: /nix/store/xhg5lzac77x3y6ww54qjrvi3ygyjxzq9-ghcide-0.1.0-exe-ghcide/bin/ghcide)
Ghcide setup tester in /home/zeta/darcs/screened/src/Darcs/UI/Commands.
Report bugs at https://github.com/digital-asset/ghcide/issues
Step 1/6: Finding files to test in /home/zeta/darcs/screened/src/Darcs/UI/Commands
Found 1 files
Step 2/6: Looking for hie.yaml files that control setup
Found 1 cradle
sessionVariables = {
EDITOR = "emacs";
HIE_HOOGLE_DATABASE = "$(cat $(which hoogle) | sed -n -e 's|.*--database \\(.*\\.hoo\\).*|\\1|p')";
NIX_GHC = "$(which ghc)";
NIX_GHCPKG = "$(which ghc-pkg)";
NIX_GHC_DOCDIR = "$NIX_GHC/../../share/doc/ghc/html";
NIX_GHC_LIBDIR = "$(ghc --print-libdir)";