1
0
Fork 0
forked from pim/blog

Create nix shell

Remove more devenv stuff
This commit is contained in:
Pim Kunis 2025-01-12 13:02:40 +01:00
parent 433c1ef4b5
commit 95b66d8c45
3 changed files with 27 additions and 15 deletions

4
.envrc
View file

@ -1,3 +1 @@
source_url "https://raw.githubusercontent.com/cachix/devenv/95f329d49a8a5289d31e0982652f7058a189bfca/direnvrc" "sha256-d+8cBpDfDBj41inrADaJt+bDWhOktwslgoP5YiGJ1v0=" use flake
use devenv

View file

@ -1 +1,6 @@
# Blog # Blog
```bash
$ cd src
$ jekyll serve
```

View file

@ -6,8 +6,12 @@
flutils.url = "github:numtide/flake-utils"; flutils.url = "github:numtide/flake-utils";
}; };
outputs = { self, nixpkgs, flutils}: flutils.lib.eachDefaultSystem (system: outputs = {
let nixpkgs,
flutils,
...
}:
flutils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
gems = pkgs.bundlerEnv { gems = pkgs.bundlerEnv {
@ -21,19 +25,20 @@
dontUnpack = true; dontUnpack = true;
installPhase = "install -Dm755 ${./patch-feed-date.py} $out/bin/patch-feed-date"; installPhase = "install -Dm755 ${./patch-feed-date.py} $out/bin/patch-feed-date";
}; };
in
{
packages = {
static-website = pkgs.stdenv.mkDerivation {
name = "blog";
src = ./src;
sourceRoot = "src";
buildInputs = [ buildInputs = [
gems gems
gems.wrappedRuby gems.wrappedRuby
patch-feed-date patch-feed-date
]; ];
in {
packages = rec {
default = static-website;
static-website = pkgs.stdenv.mkDerivation {
name = "blog";
src = ./src;
sourceRoot = "src";
inherit buildInputs;
buildPhase = '' buildPhase = ''
bundle exec jekyll build --future bundle exec jekyll build --future
@ -46,5 +51,9 @@
''; '';
}; };
}; };
devShells.default = pkgs.mkShell {
inherit buildInputs;
};
}); });
} }