Skip to content

Commit 205c7c4

Browse files
committed
update flake to support nix build
1 parent 46a8fdd commit 205c7c4

File tree

3 files changed

+33
-7
lines changed

3 files changed

+33
-7
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,12 @@ checklink/cookies.txt
149149

150150
# Quarto
151151
.quarto
152+
153+
# nix
154+
result
155+
156+
# vim
157+
.*.sw?
158+
159+
# jupyter
160+
.jupyter

flake.lock

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

flake.nix

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
nixConfig.bash-prompt = ''\033[1;32m\[[nix-develop:\[\033[36m\]\w\[\033[32m\]]$\033[0m '';
33

44
inputs = {
5-
nixpkgs.url = "github:nixos/nixpkgs/23.05-pre";
5+
nixpkgs.url = "github:nixos/nixpkgs/23.05";
66
whacked-setup = {
77
url = "github:whacked/setup/58bdbff2eec48980b010048032382bed3a152e7e";
88
flake = false;
@@ -88,13 +88,30 @@
8888
### SHORTCUTS
8989
alias check='python -m schematized_config'
9090
alias start-jupyter='jupyter notebook'
91+
alias build='NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1 nix build --impure' # quarto unsupported on mac, but not needed at runtime
9192
''; # join strings with +
9293
};
9394

9495
packages = {
95-
default = pkgs.stdenv.mkDerivation {
96-
name = "schematized-config";
96+
default = pkgs.python3Packages.buildPythonPackage rec {
97+
pname = "schematized-config";
98+
version = "0.0.10";
99+
97100
src = ./.;
101+
102+
# these deps need to be outputted with the package output.
103+
# NOTE that these are duplicated by settings.ini!
104+
propagatedBuildInputs = with pkgs.python3Packages; [
105+
fs
106+
jsonschema
107+
nbdev
108+
python-dotenv
109+
];
110+
111+
# these deps are not needed at runtime
112+
buildInputs = with pkgs.python3Packages; [
113+
setuptools
114+
];
98115
};
99116
};
100117
}

0 commit comments

Comments
 (0)