From 0c54a92057cdfacf10de4cc3e93c0452f450d9fb Mon Sep 17 00:00:00 2001 From: James Eversole Date: Sun, 13 Oct 2024 12:51:17 -0500 Subject: [PATCH] Formatting update on flake.nix; nix flake update --- flake.lock | 6 ++-- flake.nix | 84 ++++++++++++++++++++++++++---------------------------- 2 files changed, 44 insertions(+), 46 deletions(-) diff --git a/flake.lock b/flake.lock index 1f5ea31..6467f6e 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1728764407, - "narHash": "sha256-J4kaIxwjrGVQkLA6njCFH09xj2oCf/VWFircIy7b65k=", + "lastModified": 1728840985, + "narHash": "sha256-WUjdtdrRa/mPH6x918uI0nTVPidrTgkBn2VdvuOOtZo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4ada35702a7146e1df24f8d6987a1d7c1a5a4707", + "rev": "d7a38a56893692ae64ca565e9b03bc6c5cae47cb", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index f80fbbd..4fcf4fe 100644 --- a/flake.nix +++ b/flake.nix @@ -7,56 +7,54 @@ }; outputs = { self, nixpkgs, flake-utils }: - flake-utils.lib.eachDefaultSystem (system: - let - pkgs = nixpkgs.legacyPackages.${system}; - packageName = "HELPS"; - containerPackageName = "${packageName}-container"; + flake-utils.lib.eachDefaultSystem (system: let + pkgs = nixpkgs.legacyPackages.${system}; + packageName = "HELPS"; + containerPackageName = "${packageName}-container"; - haskellPackages = pkgs.haskellPackages; + haskellPackages = pkgs.haskellPackages; - enableSharedExecutables = false; - enableSharedLibraries = false; + enableSharedExecutables = false; + enableSharedLibraries = false; - HELPS = pkgs.haskell.lib.justStaticExecutables self.packages.${system}.default; - in { + HELPS = pkgs.haskell.lib.justStaticExecutables self.packages.${system}.default; + in { + packages.${packageName} = + haskellPackages.callCabal2nix packageName self rec {}; - packages.${packageName} = - haskellPackages.callCabal2nix packageName self rec {}; + packages.default = self.packages.${system}.${packageName}; + defaultPackage = self.packages.${system}.default; - packages.default = self.packages.${system}.${packageName}; - defaultPackage = self.packages.${system}.default; + devShells.default = pkgs.mkShell { + buildInputs = with pkgs; [ + ghcid + cabal-install + ghc + ]; + inputsFrom = builtins.attrValues self.packages.${system}; + }; + devShell = self.devShells.${system}.default; - devShells.default = pkgs.mkShell { - buildInputs = with pkgs; [ - ghcid - cabal-install - ghc + packages.${containerPackageName} = pkgs.dockerTools.buildImage { + name = "HELPS"; + + copyToRoot = pkgs.buildEnv { + name = "image-root"; + paths = [ HELPS ]; + pathsToLink = [ "/bin" ]; + }; + tag = "latest"; + config = { + Cmd = [ + "/bin/Purr" ]; - inputsFrom = builtins.attrValues self.packages.${system}; - }; - devShell = self.devShells.${system}.default; - - packages.${containerPackageName} = pkgs.dockerTools.buildImage { - name = "HELPS"; - - copyToRoot = pkgs.buildEnv { - name = "image-root"; - paths = [ HELPS ]; - pathsToLink = [ "/bin" ]; - }; - tag = "latest"; - config = { - Cmd = [ - "/bin/Purr" - ]; - WorkingDir = "/app"; - ExposedPorts = { - "3000/tcp" = {}; - }; - extraCommands = '' - ''; + WorkingDir = "/app"; + ExposedPorts = { + "3000/tcp" = {}; }; + extraCommands = '' + ''; }; - }); + }; + }); }