Skip to content

Commit 3901dd1

Browse files
authored
[p_unification] I, for one, welcome our new nix overlords (#91)
Why === This repository hadn't been fully nixified. What changed ============ This repository is now fully nixified. Test plan ========= ``` direnv allow && poetry shell python -m replit_river.codegen ``` no longer crashes due to a lack of stlibc++.so.
1 parent 35e1739 commit 3901dd1

4 files changed

Lines changed: 60 additions & 1 deletion

File tree

.envrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
use flake
2+
dotenv_if_exists
3+
source_env_if_exists .local.envrc

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,4 +175,7 @@ cython_debug/
175175
#.idea/
176176

177177
# Vscode
178-
.vscode/
178+
.vscode/
179+
180+
# nix
181+
.direnv/

flake.lock

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
description = "A flake that provides tools needed to hack on river-python";
3+
4+
inputs.nixpkgs.url = "github:nixos/nixpkgs";
5+
6+
outputs = { self, nixpkgs }: let
7+
mkPkgs = system: import nixpkgs {
8+
inherit system;
9+
};
10+
mkDevShell = system:
11+
let
12+
pkgs = mkPkgs system;
13+
replitNixDeps = (import ./replit.nix { pkgs = pkgs; }).deps;
14+
in
15+
pkgs.mkShell {
16+
env = {
17+
# Needed for Python/gRPC to be able to interact with libstdc++.
18+
LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib";
19+
};
20+
packages = replitNixDeps;
21+
};
22+
in
23+
{
24+
devShells.aarch64-darwin.default = mkDevShell "aarch64-darwin";
25+
devShells.x86_64-linux.default = mkDevShell "x86_64-linux";
26+
};
27+
}

0 commit comments

Comments
 (0)