From 191fb467041f4ef08ed4264ba0a0635b57d4b098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Tue, 16 Nov 2021 23:27:41 +0000 Subject: [PATCH 1/3] Makefile: Add missing phony --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c059d80..959d013 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: build repl test release help +.PHONY: build repl test release static help .DEFAULT_GOAL = help From 402d085804da8299ada15e1eb5b33e0fba352a3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Tue, 16 Nov 2021 23:28:48 +0000 Subject: [PATCH 2/3] Update to lts-17, fix warning on newer `process` --- src/System/Process/PID1.hs | 1 + stack.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/System/Process/PID1.hs b/src/System/Process/PID1.hs index 83f0b45..3b21f03 100644 --- a/src/System/Process/PID1.hs +++ b/src/System/Process/PID1.hs @@ -202,6 +202,7 @@ runAsPID1 cmd args env' timeout = do case p_ of ClosedHandle e -> assert False (exitWith e) OpenHandle pid -> return pid + OpenExtHandle{} -> error "OpenExtHandle is a Windows concept, and pid1 is not designed to run on that" _ <- forkIO $ do takeMVar killChildrenVar diff --git a/stack.yaml b/stack.yaml index b99c8d5..0a203ad 100644 --- a/stack.yaml +++ b/stack.yaml @@ -15,7 +15,7 @@ # resolver: # name: custom-snapshot # location: "./custom-snapshot.yaml" -resolver: lts-12.26 +resolver: lts-17.15 # User packages to be built. # Various formats can be used as shown in the example below. From de9912b66448f329d8ccbef382124a732adeedc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Tue, 16 Nov 2021 23:29:04 +0000 Subject: [PATCH 3/3] static: Update to newer static-haskell-nix --- default.nix | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/default.nix b/default.nix index 9658e85..e19db45 100644 --- a/default.nix +++ b/default.nix @@ -6,27 +6,26 @@ }: let cabalPackageName = "pid1"; - compiler = "ghc844"; # matching stack.yaml + compiler = "ghc8104"; # matching stack.yaml # Pin static-haskell-nix version. static-haskell-nix = if builtins.pathExists ../.in-static-haskell-nix then toString ../. # for the case that we're in static-haskell-nix itself, so that CI always builds the latest version. # Update this hash to use a different `static-haskell-nix` version: - else fetchTarball https://github.com/nh2/static-haskell-nix/archive/95fa110091dff2bf6dace3921c18a26c264d776e.tar.gz; + else fetchTarball https://github.com/nh2/static-haskell-nix/archive/57147ba740363712f589d24dfa005c8c7f6d1056.tar.gz; # Pin nixpkgs version # By default to the one `static-haskell-nix` provides, but you may also give # your own as long as it has the necessary patches, using e.g. - pkgs = import (fetchTarball https://github.com/nixos/nixpkgs/archive/ca3531850844e185d483fb878fcd00c6b44069e5.tar.gz) {}; - # pkgs = import "${static-haskell-nix}/nixpkgs.nix"; - # pkgs = import (import ./nix/sources.nix).nixpkgs {}; - + # pkgs = import (fetchTarball https://github.com/nh2/nixpkgs/archive/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa123.tar.gz) {}; + pkgs = import "${static-haskell-nix}/nixpkgs.nix"; stack2nix-script = import "${static-haskell-nix}/static-stack2nix-builder/stack2nix-script.nix" { inherit pkgs; + inherit compiler; stack-project-dir = toString ./.; # where stack.yaml is - hackageSnapshot = "2020-02-24T00:00:00Z"; # pins e.g. extra-deps without hashes or revisions + hackageSnapshot = "2021-07-11T00:00:00Z"; # pins e.g. extra-deps without hashes or revisions }; static-stack2nix-builder = import "${static-haskell-nix}/static-stack2nix-builder/default.nix" { @@ -64,7 +63,7 @@ let in { - inherit static_package; + static_package = static-stack2nix-builder.static_package; inherit fullBuildScript; # For debugging: inherit stack2nix-script;