Skip to content
This repository was archived by the owner on Dec 7, 2023. It is now read-only.

Commit d688376

Browse files
committed
Simplify nix build
1 parent afef6b5 commit d688376

File tree

3 files changed

+2
-27
lines changed

3 files changed

+2
-27
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ jobs:
1313
include:
1414
- os: ubuntu-latest
1515
targetOs: Linux
16-
- os: ubuntu-latest
17-
targetOs: Windows
18-
- os: macos-latest
19-
targetOs: macOS
2016
name: Build binary for ${{ matrix.targetOs }}
2117
runs-on: ${{ matrix.os }}
2218
steps:
@@ -46,8 +42,6 @@ jobs:
4642
matrix:
4743
os:
4844
- ubuntu-latest
49-
- windows-latest
50-
- macos-latest
5145
name: Test built binaries
5246
runs-on: ${{ matrix.os }}
5347
needs: build

.github/workflows/ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ jobs:
2121
name: hellsmack
2222
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
2323

24-
- name: Ugly hack
25-
# see https://github.com/input-output-hk/haskell.nix/issues/1097
26-
run: sed -i 's/ "x86_64-darwin"//g' flake.nix
2724
- name: Build and test
2825
run: nix flake check --option sandbox false
2926
- name: Run docspec

flake.nix

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
flake-utils.url = "github:numtide/flake-utils";
1212
};
1313
outputs = { self, nixpkgs, flake-utils, haskellNix, nur, pre-commit-hooks }:
14-
flake-utils.lib.eachSystem [ "x86_64-linux" "x86_64-darwin" ] (system:
14+
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
1515
let
1616
pkgs = import nixpkgs {
1717
inherit system;
@@ -78,23 +78,7 @@
7878
inherit (self.checks.${system}.pre-commit-check) shellHook;
7979
};
8080

81-
packages =
82-
lib.optionalAttrs pkgs.stdenv.isLinux
83-
{
84-
binaries-Linux = hsPkgs.projectCross.musl64.hsPkgs.hellsmack.components.exes.hellsmack;
85-
binaries-Windows = hsPkgs.projectCross.mingwW64.hsPkgs.hellsmack.components.exes.hellsmack;
86-
}
87-
// lib.optionalAttrs pkgs.stdenv.isDarwin {
88-
binaries-macOS = pkgs.runCommand "hellsmack-macOS"
89-
{ buildInputs = [ pkgs.macdylibbundler ]; } ''
90-
mkdir -p $out/bin
91-
cp ${hellsmack.components.exes.hellsmack}/bin/hellsmack $out/bin/hellsmack
92-
dylibbundler -b \
93-
-x $out/bin/hellsmack \
94-
-d $out/bin \
95-
-p '@executable_path'
96-
'';
97-
};
81+
packages.binaries-Linux = hsPkgs.projectCross.musl64.hsPkgs.hellsmack.components.exes.hellsmack;
9882
});
9983
nixConfig = {
10084
extra-substituters = [

0 commit comments

Comments
 (0)