Browse Source

flakes

master
Julien Marquet 3 years ago
parent
commit
4e73a56db6
  1. 41
      flake.lock
  2. 12
      flake.nix
  3. 6
      release.nix
  4. 3
      ssg/default.nix
  5. 11
      ssg/ssg.nix

41
flake.lock

@ -0,0 +1,41 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1649676176,
"narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1651024496,
"narHash": "sha256-uKSrrw/neSkxX6TXPSaMyfu7iKzFrK7F6HOt6vQefGY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d9e593ed5889f3906dc72811c45bf684be8865cf",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

12
flake.nix

@ -0,0 +1,12 @@
{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let site = import ./default.nix { pkgs = nixpkgs.legacyPackages.${system}; };
in {
hydraJobs.site = site;
});
}

6
release.nix

@ -1,6 +0,0 @@
let
pkgs = import <nixpkgs> {};
site = (import ./default.nix { inherit pkgs; }).site;
in {
site = site;
}

3
ssg/default.nix

@ -1,3 +1,2 @@
{ pkgs ? import <nixpkgs> {} }: { pkgs ? import <nixpkgs> {} }:
pkgs.haskellPackages.callCabal2nix "ssg" pkgs.haskellPackages.callPackage ./ssg.nix {}
(pkgs.lib.sourceByRegex ./. [ "^ssg\.cabal$" "^src.*" ]) {}

11
ssg/ssg.nix

@ -0,0 +1,11 @@
{ mkDerivation, base, hakyll, lib, pandoc }:
mkDerivation {
pname = "ssg";
version = "0.1.0.0";
src = ./.;
isLibrary = false;
isExecutable = true;
executableHaskellDepends = [ base hakyll pandoc ];
license = "unknown";
hydraPlatforms = lib.platforms.none;
}
Loading…
Cancel
Save