From 8e55a88c36fce499ccf796af7581fabee50b1afa Mon Sep 17 00:00:00 2001 From: mitchmindtree Date: Wed, 28 Jun 2023 18:53:45 +1000 Subject: [PATCH 1/5] Fix nix build for Tidal 2.0 (include hosc 0.20). Update nixpkgs input. This resolves the nix build issue encountered at https://github.com/tidalcycles/Tidal/pull/1022, mentioned in https://github.com/tidalcycles/Tidal/pull/1022#issuecomment-1608125266. Namely, as Tidal 2.0 requires `hosc` `0.20` but nixpkgs currently only provides `0.19.1`, we temporarily include `hosc` `0.20` directly from its source. This commit also updates the nixpkgs pin to the latest version while we're at it. --- flake.lock | 48 ++++++++++++++++++++++++++++++++++++++++++------ flake.nix | 9 +++++++++ 2 files changed, 51 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 090f8fa7f..1070cd5e9 100644 --- a/flake.lock +++ b/flake.lock @@ -1,12 +1,29 @@ { "nodes": { + "hosc": { + "flake": false, + "locked": { + "lastModified": 1669944828, + "narHash": "sha256-cHEf0yEiwNnEpDj7SSQWRMUEAT5USHuuUCPuzOXHWrk=", + "owner": "rd--", + "repo": "hosc", + "rev": "e77aa67cd0b99a32498fef246a687ba443c9b4be", + "type": "github" + }, + "original": { + "owner": "rd--", + "repo": "hosc", + "rev": "e77aa67cd0b99a32498fef246a687ba443c9b4be", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1667629849, - "narHash": "sha256-P+v+nDOFWicM4wziFK9S/ajF2lc0N2Rg9p6Y35uMoZI=", + "lastModified": 1687807295, + "narHash": "sha256-7TUD0p0m4mZpIi1O+Cyk5NCqpJUnhv/CJOAuHOndjao=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3bacde6273b09a21a8ccfba15586fb165078fb62", + "rev": "6b3d1b1cf13f407fef5e634b224d575eb7211975", "type": "github" }, "original": { @@ -18,17 +35,36 @@ }, "root": { "inputs": { + "hosc": "hosc", "nixpkgs": "nixpkgs", "utils": "utils" } }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "utils": { + "inputs": { + "systems": "systems" + }, "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "lastModified": 1687709756, + "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", "owner": "numtide", "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index fe2d0e36a..8ef683114 100644 --- a/flake.nix +++ b/flake.nix @@ -23,6 +23,14 @@ inputs = { utils.url = "github:numtide/flake-utils"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + # Temporarily add `hosc` at the latest v0.20 commit + # (nixpkgs currently only has 0.19.1). + # See this comment for details: + # https://github.com/tidalcycles/Tidal/pull/1022#issuecomment-1610978403 + hosc = { + url = "github:rd--/hosc?rev=e77aa67cd0b99a32498fef246a687ba443c9b4be"; + flake = false; + }; }; outputs = inputs: let @@ -38,6 +46,7 @@ mkPackages = pkgs: let project = pkgs.haskellPackages.extend (pkgs.haskell.lib.compose.packageSourceOverrides { + hosc = inputs.hosc; # Remove once `hosc` is at 0.20 in nixpkgs. tidal = ./.; tidal-link = ./tidal-link; tidal-listener = ./tidal-listener; From f878aad809b8501433a867acfca72327e33bcab8 Mon Sep 17 00:00:00 2001 From: Jesse Selover Date: Fri, 23 Jun 2023 20:11:06 +0200 Subject: [PATCH 2/5] Fix tidal-listener build options, and add it to the stack build too. --- stack.yaml | 1 + tidal-listener/tidal-listener.cabal | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/stack.yaml b/stack.yaml index f7359b5af..b12824c46 100644 --- a/stack.yaml +++ b/stack.yaml @@ -3,6 +3,7 @@ resolver: lts-20.5 packages: - '.' - 'tidal-parse' + - 'tidal-listener' - 'tidal-link' extra-deps: diff --git a/tidal-listener/tidal-listener.cabal b/tidal-listener/tidal-listener.cabal index 77dee66a2..75ef2bfe4 100644 --- a/tidal-listener/tidal-listener.cabal +++ b/tidal-listener/tidal-listener.cabal @@ -33,7 +33,7 @@ library default-language: Haskell2010 ghc-options: -threaded -Wall - -dynamic + -dynamic-too -- see: https://github.com/haskell-hint/hint/issues/156 From 3179c11a765dd70cb3613e945529beb288601dcf Mon Sep 17 00:00:00 2001 From: Jesse Selover Date: Fri, 23 Jun 2023 20:41:34 +0200 Subject: [PATCH 3/5] Bump action versions in workflows for nix-build and build-listener-windows. --- .github/workflows/listener-build-windows.yml | 2 +- .github/workflows/nix.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/listener-build-windows.yml b/.github/workflows/listener-build-windows.yml index 1ee1b6bdb..6b54908d7 100644 --- a/.github/workflows/listener-build-windows.yml +++ b/.github/workflows/listener-build-windows.yml @@ -16,7 +16,7 @@ jobs: uses: actions/checkout@v2 - name: Setup Haskell - uses: haskell/actions/setup@v1 + uses: haskell/actions/setup@v2 id: setup-haskell-cabal with: ghc-version: ${{ matrix.ghc }} diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index b761710b4..e608b9dfb 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.4.0 - - uses: cachix/install-nix-action@v16 + - uses: cachix/install-nix-action@v22 with: nix_path: nixpkgs=channel:nixos-unstable - run: nix fmt -- --check ./ @@ -36,7 +36,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2.4.0 - - uses: cachix/install-nix-action@v16 + - uses: cachix/install-nix-action@v22 with: nix_path: nixpkgs=channel:nixos-unstable - run: nix build --print-build-logs --no-update-lock-file .#${{ matrix.package }} From aab0ff2b9dc1a961514137ec66620f5f4570c2dc Mon Sep 17 00:00:00 2001 From: Jesse Selover Date: Mon, 26 Jun 2023 14:45:38 +0200 Subject: [PATCH 4/5] Don't build dynamic libraries for tidal-listener on Windows. --- tidal-listener/tidal-listener.cabal | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tidal-listener/tidal-listener.cabal b/tidal-listener/tidal-listener.cabal index 75ef2bfe4..464d8caa8 100644 --- a/tidal-listener/tidal-listener.cabal +++ b/tidal-listener/tidal-listener.cabal @@ -33,8 +33,9 @@ library default-language: Haskell2010 ghc-options: -threaded -Wall - -dynamic-too -- see: https://github.com/haskell-hint/hint/issues/156 + if !os(windows) + ghc-options: -dynamic-too executable tidal-listener @@ -46,5 +47,6 @@ executable tidal-listener default-language: Haskell2010 ghc-options: -threaded -Wall - -dynamic -- see: https://github.com/haskell-hint/hint/issues/156 + if !os(windows) + ghc-options: -dynamic-too From ed32bc55d92d9ee360c0fbcba85c24f21ba34a72 Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 2 Dec 2023 21:54:05 +0000 Subject: [PATCH 5/5] Lower bounds for criterion for benchmarks --- tidal.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tidal.cabal b/tidal.cabal index b90bd9377..4556998a4 100644 --- a/tidal.cabal +++ b/tidal.cabal @@ -116,7 +116,7 @@ benchmark bench-speed Tidal.Inputs build-depends: base == 4.* - , criterion + , criterion >= 1.6.3.0 , tidal ghc-options: -Wall