feat(users/Profpatsch): global shell for my userdir
For my tooling, I want to be able to use vscode language servers for all subprojects, and the best ways to do that I’ve found so far is to add a global shell.nix which contains the transitive closure of all dependencies I need. This is not /nice/ per se, but it does the job with minimal effort right now and gives me a good development environment for all these crazy & dumb experiments in here. Change-Id: I717a72f490e9d58d45e4e15e9ba604c36b299814 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7794 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
This commit is contained in:
parent
a149a1ee06
commit
727e6d890c
4 changed files with 86 additions and 0 deletions
1
users/Profpatsch/.envrc
Normal file
1
users/Profpatsch/.envrc
Normal file
|
@ -0,0 +1 @@
|
|||
eval "$(lorri direnv)"
|
1
users/Profpatsch/.gitignore
vendored
Normal file
1
users/Profpatsch/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
dist-newstyle/
|
14
users/Profpatsch/.vscode/settings.json
vendored
Normal file
14
users/Profpatsch/.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"sqltools.connections": [
|
||||
{
|
||||
"previewLimit": 50,
|
||||
"driver": "SQLite",
|
||||
"name": "cas-serve",
|
||||
"database": "${workspaceFolder:Profpatsch}/cas-serve/data.sqlite"
|
||||
}
|
||||
],
|
||||
"sqltools.useNodeRuntime": true,
|
||||
"[haskell]": {
|
||||
"editor.formatOnSave": true
|
||||
}
|
||||
}
|
70
users/Profpatsch/shell.nix
Normal file
70
users/Profpatsch/shell.nix
Normal file
|
@ -0,0 +1,70 @@
|
|||
# generic shell.nix that can be used for most of my projects here,
|
||||
# until I figure out a way to have composable shells.
|
||||
let root = (import ../../. { }); in
|
||||
{ pkgs ? root.third_party.nixpkgs, depot ? root, ... }:
|
||||
|
||||
pkgs.mkShell {
|
||||
buildInputs = [
|
||||
pkgs.sqlite-interactive
|
||||
pkgs.sqlite-utils
|
||||
pkgs.haskell-language-server
|
||||
pkgs.cabal-install
|
||||
(pkgs.haskellPackages.ghcWithHoogle (h: [
|
||||
h.async
|
||||
h.aeson-better-errors
|
||||
h.conduit-extra
|
||||
h.error
|
||||
h.PyF
|
||||
h.unliftio
|
||||
h.wai
|
||||
h.warp
|
||||
h.profunctors
|
||||
h.semigroupoids
|
||||
h.validation-selective
|
||||
h.free
|
||||
h.cryptonite-conduit
|
||||
h.sqlite-simple
|
||||
h.hedgehog
|
||||
h.http-conduit
|
||||
h.nonempty-containers
|
||||
h.deriving-compat
|
||||
h.unix
|
||||
h.attoparsec
|
||||
h.iCalendar
|
||||
h.case-insensitive
|
||||
h.hscolour
|
||||
h.nicify-lib
|
||||
h.hspec-expectations-pretty-diff
|
||||
depot.users.Profpatsch.my-prelude
|
||||
depot.users.Profpatsch.netencode.netencode-hs
|
||||
depot.users.Profpatsch.execline.exec-helpers-hs
|
||||
|
||||
]))
|
||||
|
||||
pkgs.rustup
|
||||
pkgs.pkg-config
|
||||
pkgs.fuse
|
||||
];
|
||||
|
||||
|
||||
RUSTC_WRAPPER =
|
||||
let
|
||||
wrapperArgFile = libs: pkgs.writeText "rustc-wrapper-args"
|
||||
(pkgs.lib.concatStringsSep
|
||||
"\n"
|
||||
(pkgs.lib.concatLists
|
||||
(map
|
||||
(lib: [
|
||||
"-L"
|
||||
"${pkgs.lib.getLib lib}/lib"
|
||||
])
|
||||
libs)));
|
||||
in
|
||||
depot.nix.writeExecline "rustc-wrapper" { readNArgs = 1; } [
|
||||
"$1"
|
||||
"$@"
|
||||
"@${wrapperArgFile [
|
||||
depot.third_party.rust-crates.nom
|
||||
]}"
|
||||
];
|
||||
}
|
Loading…
Reference in a new issue