Skip to content

Commit 30d16b1

Browse files
authored
nix: dev shell update (#1002)
1 parent dd861e5 commit 30d16b1

File tree

87 files changed

+134
-130
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+134
-130
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@ jobs:
2626
uses: coursier/cache-action@v6
2727

2828
- name: "Install Nix ❄️"
29-
uses: cachix/install-nix-action@v27
29+
uses: cachix/install-nix-action@v31.2.0
3030

3131
- name: "Install Cachix ❄️"
32-
uses: cachix/cachix-action@v15
32+
uses: cachix/cachix-action@v16
3333
with:
34-
name: redis4cats
35-
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
34+
name: profunktor
35+
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
3636

3737
- name: "Run tests and compile documentation 🚀"
38-
run: nix develop -c sbt 'buildRedis4Cats'
38+
run: nix run .#sbt -- buildRedis4Cats
3939

4040
- name: "Test for Binary Compatibility 📦"
41-
run: nix develop -c sbt 'mimaReportBinaryIssuesIfRelevant'
41+
run: nix run .#sbt mimaReportBinaryIssuesIfRelevant
4242

4343
- name: "Shutting down Valkey 🐳"
4444
run: docker compose down

.github/workflows/publish-site.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ jobs:
2121
fetch-depth: 0 # fetch all branches & tags
2222

2323
- name: "Install Nix ❄️"
24-
uses: cachix/install-nix-action@v22
24+
uses: cachix/install-nix-action@v31.2.0
2525

2626
- name: "Install Cachix ❄️"
27-
uses: cachix/cachix-action@v12
27+
uses: cachix/cachix-action@v16
2828
with:
29-
name: redis4cats
30-
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
29+
name: profunktor
30+
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
3131

3232
- name: "Building and publishing microsite 🚧"
33-
run: nix develop -c sbt 'publishSite'
33+
run: nix run .#sbt -- publishSite

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ jobs:
1818
fetch-depth: 0 # fetch all branches & tags
1919

2020
- name: "Install Nix ❄️"
21-
uses: cachix/install-nix-action@v22
21+
uses: cachix/install-nix-action@v31.2.0
2222

2323
- name: "Install Cachix ❄️"
24-
uses: cachix/cachix-action@v12
24+
uses: cachix/cachix-action@v16
2525
with:
26-
name: redis4cats
27-
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
26+
name: profunktor
27+
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
2828

2929
- name: "Publish ${{ github.ref }} 🚀"
3030
env:
3131
PGP_PASSPHRASE: "${{ secrets.PGP_PASSPHRASE }}"
3232
PGP_SECRET: "${{ secrets.PGP_SECRET }}"
3333
SONATYPE_PASSWORD: "${{ secrets.SONATYPE_PASSWORD }}"
3434
SONATYPE_USERNAME: "${{ secrets.SONATYPE_USERNAME }}"
35-
run: nix develop -c sbt 'ci-release'
35+
run: nix run .#sbt -- ci-release

build.sbt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ promptTheme := PromptTheme(
2020
ThisBuild / organization := "dev.profunktor"
2121
ThisBuild / homepage := Some(url("https://redis4cats.profunktor.dev/"))
2222
ThisBuild / licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0"))
23+
ThisBuild / sonatypeCredentialHost := xerial.sbt.Sonatype.sonatypeCentralHost
2324
ThisBuild / developers := List(
2425
Developer(
2526
"gvolpe",
2627
"Gabriel Volpe",
27-
28+
2829
url("https://gvolpe.com")
2930
)
3031
)
@@ -40,7 +41,7 @@ val commonSettings = Seq(
4041
organizationName := "Redis client for Cats Effect & Fs2",
4142
startYear := Some(2018),
4243
licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.txt")),
43-
headerLicense := Some(HeaderLicense.ALv2("2018-2021", "ProfunKtor")),
44+
headerLicense := Some(HeaderLicense.ALv2("2018-2025", "ProfunKtor")),
4445
testFrameworks += new TestFramework("munit.Framework"),
4546
libraryDependencies ++= Seq(
4647
Libraries.catsEffectKernel,

flake.lock

Lines changed: 7 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,47 @@
22
description = "Scala development shell";
33

44
inputs = {
5-
nixpkgs.url = github:nixos/nixpkgs/nixpkgs-unstable;
5+
nixpkgs.url = "nixpkgs/nixos-unstable";
66
flake-utils.url = github:numtide/flake-utils;
77
};
88

99
outputs = { nixpkgs, flake-utils, ... }:
1010
flake-utils.lib.eachDefaultSystem (system:
1111
let
12-
# Setting SBT_OPTS because of this bug: https://github.com/sbt/sbt-site/issues/169
13-
sbt-overlay = self: super: {
14-
sbt = super.sbt.overrideAttrs (
15-
old: {
16-
nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [ super.makeWrapper ];
17-
postInstall = ''
18-
wrapProgram $out/bin/sbt --suffix SBT_OPTS : '--add-opens java.base/java.lang=ALL-UNNAMED'
19-
'';
20-
}
21-
);
22-
};
23-
pkgs = import nixpkgs {
24-
inherit system;
25-
overlays = [ sbt-overlay ];
26-
};
27-
jdk = pkgs.jdk19_headless;
12+
overlays = [
13+
(self: super: {
14+
jre = super.jdk21_headless;
15+
sbt = super.sbt.overrideAttrs (
16+
old: {
17+
nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [ super.makeWrapper ];
18+
# Setting SBT_OPTS because of this bug: https://github.com/sbt/sbt-site/issues/169
19+
postInstall = ''
20+
wrapProgram $out/bin/sbt --suffix SBT_OPTS : '--add-opens java.base/java.lang=ALL-UNNAMED'
21+
'';
22+
}
23+
);
24+
})
25+
];
26+
pkgs = import nixpkgs { inherit system overlays; };
2827
in
2928
{
3029
devShell = pkgs.mkShell {
3130
name = "scala-dev-shell";
32-
buildInputs = [
33-
jdk
34-
pkgs.gnupg
35-
pkgs.jekyll
36-
pkgs.sbt
31+
32+
buildInputs = with pkgs; [
33+
gnupg
34+
jekyll
35+
jre
36+
sbt
3737
];
3838

3939
shellHook = ''
40-
JAVA_HOME="${jdk}"
40+
JAVA_HOME="${pkgs.jre}"
4141
'';
4242
};
43+
44+
packages = {
45+
inherit (pkgs) sbt;
46+
};
4347
});
4448
}

modules/core/src/main/scala-2.13+/dev.profunktor.redis4cats/JavaConversions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2021 ProfunKtor
2+
* Copyright 2018-2025 ProfunKtor
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

modules/core/src/main/scala-2/dev/profunktor/redis4cats/TypeInqualityCompat.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2021 ProfunKtor
2+
* Copyright 2018-2025 ProfunKtor
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

modules/core/src/main/scala-2/dev/profunktor/redis4cats/syntax/RedisURIOps.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2021 ProfunKtor
2+
* Copyright 2018-2025 ProfunKtor
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

modules/core/src/main/scala-2/dev/profunktor/redis4cats/syntax/macros.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2021 ProfunKtor
2+
* Copyright 2018-2025 ProfunKtor
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)