commit 1ad7ce3440210afffd390c342cfe636ae1d97fef
parent a9c08415926e0511f0ba901bdebd3c37a1f4f5de
Author: James Eversole <james@eversole.co>
Date: Sun, 7 May 2023 13:08:47 -0500
Remove nix2container from flake, update dev shell config
Diffstat:
4 files changed, 6 insertions(+), 59 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -5,4 +5,6 @@ bin/
/Dockerfile
/docker-stack.yml
.stack-work/
+*.swp
+dist*
*~
diff --git a/TODO b/TODO
@@ -1 +0,0 @@
-- Make the Docker images much smaller
diff --git a/flake.lock b/flake.lock
@@ -18,57 +18,8 @@
"type": "github"
}
},
- "flake-utils_2": {
- "locked": {
- "lastModified": 1653893745,
- "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
- "owner": "numtide",
- "repo": "flake-utils",
- "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
- "type": "github"
- },
- "original": {
- "owner": "numtide",
- "repo": "flake-utils",
- "type": "github"
- }
- },
- "nix2container": {
- "inputs": {
- "flake-utils": "flake-utils_2",
- "nixpkgs": "nixpkgs"
- },
- "locked": {
- "lastModified": 1677791117,
- "narHash": "sha256-zL4Fc5133KMqX7zCzcPODaBPEblUfgQt2UccNBm34Pc=",
- "owner": "nlewo",
- "repo": "nix2container",
- "rev": "85670cab354f7df69dd4af097c27cf9bc5826cb2",
- "type": "github"
- },
- "original": {
- "owner": "nlewo",
- "repo": "nix2container",
- "type": "github"
- }
- },
"nixpkgs": {
"locked": {
- "lastModified": 1677612629,
- "narHash": "sha256-yC+9LfhfwOd5sXFW8TLnDmqVMNYiHXYPGy9BbdpRqfU=",
- "owner": "NixOS",
- "repo": "nixpkgs",
- "rev": "111ca8e0378e88d9decaa1c6dd7597f35d8bc67f",
- "type": "github"
- },
- "original": {
- "owner": "NixOS",
- "repo": "nixpkgs",
- "type": "github"
- }
- },
- "nixpkgs_2": {
- "locked": {
"lastModified": 1683159243,
"narHash": "sha256-Fh41KQcZTswb4NyYfSsbNEhDS/Im0/Id6m3k7qZ6/Xw=",
"owner": "NixOS",
@@ -85,8 +36,7 @@
"root": {
"inputs": {
"flake-utils": "flake-utils",
- "nix2container": "nix2container",
- "nixpkgs": "nixpkgs_2"
+ "nixpkgs": "nixpkgs"
}
},
"systems": {
diff --git a/flake.nix b/flake.nix
@@ -4,25 +4,21 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
- nix2container.url = "github:nlewo/nix2container";
};
- outputs = { self, nixpkgs, flake-utils, nix2container }:
+ outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
packageName = "purr";
dockerPackageName = "${packageName}-docker";
- nix2containerPkgs = nix2container.packages.x86_64-linux;
-
haskellPackages = pkgs.haskellPackages;
enableSharedExecutables = false;
enableSharedLibraries = false;
purr = pkgs.haskell.lib.justStaticExecutables self.packages.${system}.default;
-
in {
packages.${packageName} =
@@ -35,10 +31,10 @@
buildInputs = with pkgs; [
ghcid
cabal-install
+ ghc
];
- inputsFrom = map (__getAttr "env") (__attrValues self.packages.${system});
+ inputsFrom = builtins.attrValues self.packages.${system};
};
-
devShell = self.devShells.${system}.default;
packages.${dockerPackageName} = pkgs.dockerTools.buildImage {