summaryrefslogtreecommitdiff
path: root/flake.nix
blob: 3bebfa6058b356f47e1aa4d1f73c79172a838d06 (plain)
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
{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/master";
  };
  outputs = inputs @ {
      ...
  }: let
      supportedSystems = [ "x86_64-linux" "aarch64-linux" ];
      forAllSystems = inputs.nixpkgs.lib.genAttrs supportedSystems;

      nixpkgsFor = forAllSystems (system:
        import inputs.nixpkgs
          {
            inherit system;
            overlays = [  ];
          });
  in {
      packages = forAllSystems (system:
        let
          pkgs = nixpkgsFor.${system};
        in with pkgs; rec {
          mike-vinkies-net = stdenv.mkDerivation {
            name = "mike-vinkies-net";
            src = ./.;
            buildInputs = [ pkgs.deno ];
            buildPhase = ''
              export DENO_DIR=vendor
              deno --version
              deno task build
            '';
            installPhase = ''
              mkdir -p $out/var/www
              cp -vrf _site $out/var/www/mike.vinkies.net
            '';
          };
          default = mike-vinkies-net;
      });
  };
}