Create nix shell
Remove more devenv stuff
This commit is contained in:
parent
433c1ef4b5
commit
95b66d8c45
3 changed files with 27 additions and 15 deletions
4
.envrc
4
.envrc
|
@ -1,3 +1 @@
|
|||
source_url "https://raw.githubusercontent.com/cachix/devenv/95f329d49a8a5289d31e0982652f7058a189bfca/direnvrc" "sha256-d+8cBpDfDBj41inrADaJt+bDWhOktwslgoP5YiGJ1v0="
|
||||
|
||||
use devenv
|
||||
use flake
|
||||
|
|
|
@ -1 +1,6 @@
|
|||
# Blog
|
||||
|
||||
```bash
|
||||
$ cd src
|
||||
$ jekyll serve
|
||||
```
|
||||
|
|
33
flake.nix
33
flake.nix
|
@ -6,8 +6,12 @@
|
|||
flutils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flutils}: flutils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
flutils,
|
||||
...
|
||||
}:
|
||||
flutils.lib.eachDefaultSystem (system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
||||
gems = pkgs.bundlerEnv {
|
||||
|
@ -17,23 +21,24 @@
|
|||
|
||||
patch-feed-date = pkgs.stdenv.mkDerivation {
|
||||
name = "path-feed-date";
|
||||
propagatedBuildInputs = [ pkgs.python3 ];
|
||||
propagatedBuildInputs = [pkgs.python3];
|
||||
dontUnpack = true;
|
||||
installPhase = "install -Dm755 ${./patch-feed-date.py} $out/bin/patch-feed-date";
|
||||
};
|
||||
in
|
||||
{
|
||||
packages = {
|
||||
|
||||
buildInputs = [
|
||||
gems
|
||||
gems.wrappedRuby
|
||||
patch-feed-date
|
||||
];
|
||||
in {
|
||||
packages = rec {
|
||||
default = static-website;
|
||||
static-website = pkgs.stdenv.mkDerivation {
|
||||
name = "blog";
|
||||
src = ./src;
|
||||
sourceRoot = "src";
|
||||
|
||||
buildInputs = [
|
||||
gems
|
||||
gems.wrappedRuby
|
||||
patch-feed-date
|
||||
];
|
||||
inherit buildInputs;
|
||||
|
||||
buildPhase = ''
|
||||
bundle exec jekyll build --future
|
||||
|
@ -46,5 +51,9 @@
|
|||
'';
|
||||
};
|
||||
};
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
inherit buildInputs;
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue