-
-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #761 from fricklerhandwerk/remove-flakes
remove flake.nix
- Loading branch information
Showing
6 changed files
with
289 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,70 @@ | ||
(import (fetchTarball https://github.com/edolstra/flake-compat/archive/master.tar.gz) { | ||
src = builtins.fetchGit ./.; | ||
}).defaultNix | ||
{ inputs ? import ./nix/sources.nix }: | ||
let | ||
pkgs = import inputs.nixpkgs { | ||
config = { }; | ||
overlays = [ (import ./overlay.nix) ]; | ||
}; | ||
|
||
nix-dev = pkgs.stdenv.mkDerivation { | ||
name = "nix-dev"; | ||
src = ./.; | ||
nativeBuildInputs = with pkgs.python310.pkgs; [ | ||
linkify-it-py | ||
myst-parser | ||
sphinx | ||
sphinx-book-theme | ||
sphinx-copybutton | ||
sphinx-design | ||
sphinx-notfound-page | ||
sphinx-sitemap | ||
]; | ||
buildPhase = '' | ||
make html | ||
''; | ||
installPhase = '' | ||
mkdir -p $out | ||
cp -R build/html/* $out/ | ||
''; | ||
}; | ||
|
||
devmode = | ||
let | ||
pythonEnvironment = pkgs.python310.withPackages (ps: with ps; [ | ||
livereload | ||
]); | ||
script = '' | ||
from livereload import Server, shell | ||
server = Server() | ||
build_docs = shell("make html") | ||
print("Doing an initial build of the docs...") | ||
build_docs() | ||
server.watch("source/*", build_docs) | ||
server.watch("source/**/*", build_docs) | ||
server.watch("_templates/*.html", build_docs) | ||
server.serve(root="build/html") | ||
''; | ||
in | ||
pkgs.writeShellApplication { | ||
name = "devmode"; | ||
runtimeInputs = [ pythonEnvironment ]; | ||
text = '' | ||
python ${pkgs.writeText "live.py" script} | ||
''; | ||
}; | ||
in | ||
{ | ||
# build with `nix-build -A build` | ||
build = nix-dev; | ||
|
||
shell = pkgs.mkShell { | ||
inputsFrom = [ nix-dev ]; | ||
packages = with pkgs.python310.pkgs; [ | ||
black | ||
devmode | ||
]; | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"nixpkgs": { | ||
"branch": "nixos-23.05", | ||
"description": "Nix Packages collection & NixOS", | ||
"homepage": "", | ||
"owner": "NixOS", | ||
"repo": "nixpkgs", | ||
"rev": "898cb2064b6e98b8c5499f37e81adbdf2925f7c5", | ||
"sha256": "0ha53gbglrcnpzfc4lwzgyvlsagvm1m2q9z5i5b4nfahplnqpsbj", | ||
"type": "tarball", | ||
"url": "https://github.com/NixOS/nixpkgs/archive/898cb2064b6e98b8c5499f37e81adbdf2925f7c5.tar.gz", | ||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" | ||
}, | ||
"poetry2nix": { | ||
"branch": "master", | ||
"description": "Convert poetry projects to nix automagically [maintainer=@adisbladis] ", | ||
"homepage": "", | ||
"owner": "nix-community", | ||
"repo": "poetry2nix", | ||
"rev": "fe0dcb4c9b44162a385f1170895fe6a392ed71b5", | ||
"sha256": "0cxccm7hzcmizhbg79rdqimjndin98waibw824cmgzwwqkyzl9lv", | ||
"type": "tarball", | ||
"url": "https://github.com/nix-community/poetry2nix/archive/fe0dcb4c9b44162a385f1170895fe6a392ed71b5.tar.gz", | ||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" | ||
} | ||
} |
Oops, something went wrong.