-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
57 lines (45 loc) · 2.03 KB
/
flake.nix
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
47
48
49
50
51
52
53
54
55
56
57
{
description = "CodeDown languages";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/release-24.05";
inputs.nixpkgs-master.url = "github:NixOS/nixpkgs/master";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, nixpkgs-master, flake-utils }@inputs:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [];
pkgsStable = import nixpkgs { inherit system overlays; };
pkgsMaster = import nixpkgs-master { inherit system overlays; };
codedown = import ./codedown.nix { inherit pkgsStable pkgsMaster; };
sampleOutputs = pkgsStable.callPackage ./nix/sample-outputs.nix { inherit codedown pkgsStable; };
in
{
packages = {
# For nix repl debugging
# inherit codedown;
# For testing out the nixpkgs overlay
# environmentUsingNixpkgsOverlay = ((import nixpkgs {
# inherit system;
# overlays = [(pkgsStable.callPackage ./nix/nixpkgs-overlay.nix {})];
# }).makeEnvironment {
# su.enable = true;
# # su.outputs = ["out" "baz"];
# # _module.check = false;
# });
searcher = codedown.searcher pkgsStable;
# Tests use flake to do packageSearch builds
inherit (codedown) packageSearch;
allSettingsSchemas = pkgsStable.callPackage ./nix/all-settings-schemas.nix { inherit (sampleOutputs) sample_environments; };
# For .envrc
nixpkgsPath = pkgsStable.writeShellScriptBin "nixpkgsPath.sh" "echo -n ${pkgsStable.path}";
jupyter-runner = pkgsMaster.callPackage ./nix/jupyter-runner.nix {};
notebook = with pkgsStable; python3.pkgs.toPythonModule (
python3.pkgs.notebook.overridePythonAttrs (oldAttrs: {
makeWrapperArgs = ["--set JUPYTER_PATH ${sampleOutputs.sample_environments.mega}/lib/codedown"];
})
);
}
// sampleOutputs.inner
;
}
);
}