-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
46 lines (44 loc) · 1.12 KB
/
flake.nix
File metadata and controls
46 lines (44 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
inputs = {
utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
utils,
}: utils.lib.eachDefaultSystem (system:
let
inherit (nixpkgs) lib;
pkgs = nixpkgs.legacyPackages.${system};
python = pkgs.python312;
uvWrapped = pkgs.stdenv.mkDerivation {
name = "uv-wrapped";
nativeBuildInputs = [pkgs.makeWrapper];
buildCommand = if pkgs.stdenv.isLinux then ''
mkdir $out
makeWrapper ${pkgs.uv}/bin/uv $out/bin/uv \
--prefix UV_PYTHON_DOWNLOADS : "never" \
--prefix UV_PYTHON : "${python.interpreter}" \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath pkgs.pythonManylinuxPackages.manylinux1}"
'' else ''
mkdir $out
makeWrapper ${pkgs.uv}/bin/uv $out/bin/uv \
--prefix UV_PYTHON_DOWNLOADS : "never" \
--prefix UV_PYTHON : "${python.interpreter}" '';
};
in
{
devShell = with pkgs; mkShell {
packages = [
python
uvWrapped
awscli2
sqlite
];
shellHook = ''
unset PYTHONPATH
SHELL=${pkgs.bashInteractive}/bin/bash
'';
};
});
}