Remove nix2container from flake, update dev shell config

This commit is contained in:
James Eversole 2023-05-07 13:08:47 -05:00
parent a9c0841592
commit 1ad7ce3440
4 changed files with 6 additions and 59 deletions

2
.gitignore vendored
View File

@ -5,4 +5,6 @@ bin/
/Dockerfile /Dockerfile
/docker-stack.yml /docker-stack.yml
.stack-work/ .stack-work/
*.swp
dist*
*~ *~

1
TODO
View File

@ -1 +0,0 @@
- Make the Docker images much smaller

52
flake.lock generated
View File

@ -18,56 +18,7 @@
"type": "github" "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": { "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": { "locked": {
"lastModified": 1683159243, "lastModified": 1683159243,
"narHash": "sha256-Fh41KQcZTswb4NyYfSsbNEhDS/Im0/Id6m3k7qZ6/Xw=", "narHash": "sha256-Fh41KQcZTswb4NyYfSsbNEhDS/Im0/Id6m3k7qZ6/Xw=",
@ -85,8 +36,7 @@
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nix2container": "nix2container", "nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs_2"
} }
}, },
"systems": { "systems": {

View File

@ -4,25 +4,21 @@
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs"; nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils"; 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: flake-utils.lib.eachDefaultSystem (system:
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
packageName = "purr"; packageName = "purr";
dockerPackageName = "${packageName}-docker"; dockerPackageName = "${packageName}-docker";
nix2containerPkgs = nix2container.packages.x86_64-linux;
haskellPackages = pkgs.haskellPackages; haskellPackages = pkgs.haskellPackages;
enableSharedExecutables = false; enableSharedExecutables = false;
enableSharedLibraries = false; enableSharedLibraries = false;
purr = pkgs.haskell.lib.justStaticExecutables self.packages.${system}.default; purr = pkgs.haskell.lib.justStaticExecutables self.packages.${system}.default;
in { in {
packages.${packageName} = packages.${packageName} =
@ -35,10 +31,10 @@
buildInputs = with pkgs; [ buildInputs = with pkgs; [
ghcid ghcid
cabal-install cabal-install
ghc
]; ];
inputsFrom = map (__getAttr "env") (__attrValues self.packages.${system}); inputsFrom = builtins.attrValues self.packages.${system};
}; };
devShell = self.devShells.${system}.default; devShell = self.devShells.${system}.default;
packages.${dockerPackageName} = pkgs.dockerTools.buildImage { packages.${dockerPackageName} = pkgs.dockerTools.buildImage {