Remove flake-utils, add hydraJobs

main
Oystein Kristoffer Tveit 2022-11-01 17:51:36 +01:00
parent e4ffa89a4a
commit 627c8e7a25
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
2 changed files with 44 additions and 51 deletions

View File

@ -1,27 +1,12 @@
{ {
"nodes": { "nodes": {
"flake-utils": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1665613119, "lastModified": 1667254466,
"narHash": "sha256-VTutbv5YKeBGWou6ladtgfx11h6et+Wlkdyh4jPJ3p0=", "narHash": "sha256-YrMQzDVOo+uz5gg1REj2q/uVhJE3WcpkqGiMzh3Da3o=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e06bd4b64bbfda91d74f13cb5eca89485d47528f", "rev": "1b4722674c315de0e191d0d79790b4eac51570a1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -32,7 +17,6 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
} }

View File

@ -5,44 +5,53 @@
inputs = { inputs = {
nixpkgs.url = "nixpkgs/nixos-22.05"; nixpkgs.url = "nixpkgs/nixos-22.05";
flake-utils.url = "github:numtide/flake-utils";
}; };
outputs = { flake-utils, nixpkgs, self }: outputs = { nixpkgs, self }: let
flake-utils.lib.eachDefaultSystem (system: system = "x86_64-linux";
let overlays = [ (import ./nix/haskell-overlay.nix) ];
config = {}; pkgs = import nixpkgs { inherit overlays system; };
overlays = [ (import ./nix/haskell-overlay.nix) ]; in rec {
pkgs = import nixpkgs { inherit config overlays system; }; overlays = {
in rec { haskell-overlay = import ./nix/haskell-overlay.nix;
defaultPackage = packages.website; default = self.overlays.haskell-overlay;
defaultApp = apps.hakyll-site; };
packages = with pkgs.myHaskellPackages; { inherit ssg website; }; packages.${system} = with pkgs.myHaskellPackages; {
inherit ssg website;
default = website;
};
apps.hakyll-site = let apps.${system} = {
drv = packages.ssg; hakyll-site = let
exePath = "/bin/hakyll-site"; drv = packages.ssg;
in { exePath = "/bin/hakyll-site";
type = "app"; in {
program = "${drv}${exePath}"; type = "app";
}; program = "${drv}${exePath}";
};
default = self.apps.${system}.hakyll-site;
};
devShell = pkgs.myHaskellPackages.shellFor { devShells.${system}.default = pkgs.myHaskellPackages.shellFor {
packages = p: [ p.ssg ]; packages = p: [ p.ssg ];
buildInputs = with pkgs.myHaskellPackages; [ buildInputs = with pkgs.myHaskellPackages; [
# ssg # ssg
# Helpful tools for `nix develop` shells # Helpful tools for `nix develop` shells
ghcid # https://github.com/ndmitchell/ghcid ghcid # https://github.com/ndmitchell/ghcid
haskell-language-server # https://github.com/haskell/haskell-language-server haskell-language-server # https://github.com/haskell/haskell-language-server
hlint # https://github.com/ndmitchell/hlint hlint # https://github.com/ndmitchell/hlint
ormolu # https://github.com/tweag/ormolu ormolu # https://github.com/tweag/ormolu
]; ];
withHoogle = true; withHoogle = true;
}; };
}
); hydraJobs = {
ssg.${system} = self.packages.${system}.ssg;
website.${system} = self.packages.${system}.website;
};
};
} }