-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
41 lines (38 loc) · 1.15 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
{
description = "Primary package repository for unicornpkg.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11";
devenv.url = "github:cachix/devenv";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, devenv, flake-utils, ... } @ inputs:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
packages.unicornpkg-main = pkgs.stdenv.mkDerivation rec {
name = "unicornpkg-main";
src = ./.;
nativeBuildInputs = [ pkgs.findutils ];
configurePhase = ''
find -type l -exec bash -c 'ln -f "$(readlink -m "$0")" "$0"' {} \;
'';
installPhase = ''
mkdir $out
cp $src/*.lua $out
'';
};
defaultPackage = self.packages.${system}.unicornpkg-main;
devShell = pkgs.mkShell {
buildInputs = [ pkgs.hugo ];
inherit inputs pkgs;
modules = [
({ pkgs, ... }: {
# This is your devenv configuration
packages = [ ];
})
];
};
});
}