Skip to content

Commit

Permalink
Change flake outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjm committed Nov 29, 2024
1 parent 9e99a6f commit 5620cfc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
ghc:
- "9.4.7"
- "9.6.3"

steps:
- name: Install libraries
Expand Down Expand Up @@ -81,4 +81,4 @@ jobs:
- name: Build
run: |
nix build .#ghc947-static
nix build
14 changes: 7 additions & 7 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@

pkgs = import nixpkgs { inherit system overlays; inherit (haskellNix) config; };

flake = compiler-nix-name: (pkgs.hixProject compiler-nix-name).flake {};
flakeStatic = compiler-nix-name: (pkgs.pkgsCross.musl64.hixProject compiler-nix-name).flake {};
flake = (pkgs.hixProject compiler-nix-name).flake {};
flakeStatic = (pkgs.pkgsCross.musl64.hixProject compiler-nix-name).flake {};

packageForGitHub = rnls: pkgs.runCommand "rust-notebook-language-server-${rnls.version}" {} ''
name="rust-notebook-language-server-${rnls.version}-x86_64-linux"
Expand All @@ -63,14 +63,14 @@
packages = (rec {
inherit (pkgs) cabal2nix;

default = (flake compiler-nix-name).packages."rust-notebook-language-server:exe:rust-notebook-language-server";
defaultStatic = (flakeStatic compiler-nix-name).packages."rust-notebook-language-server:exe:rust-notebook-language-server";
packaged = packageForGitHub defaultStatic;
default = flakeStatic.packages."rust-notebook-language-server:exe:rust-notebook-language-server";
dynamic = flake.packages."rust-notebook-language-server:exe:rust-notebook-language-server";
packaged = packageForGitHub default;

# No GMP (we test the dynamic builds to make sure GMP doesn't end up in the static builds)
verify-no-gmp = pkgs.writeShellScriptBin "verify-no-gmp.sh" ''
echo "Checking for libgmp in ${default}/bin/rust-notebook-language-server"
(echo "$(ldd ${default}/bin/rust-notebook-language-server)" | grep libgmp) && exit 1
echo "Checking for libgmp in ${dynamic}/bin/rust-notebook-language-server"
(echo "$(ldd ${dynamic}/bin/rust-notebook-language-server)" | grep libgmp) && exit 1
exit 0
'';
Expand Down

0 comments on commit 5620cfc

Please sign in to comment.