Skip to content

Commit

Permalink
build: Bump nixpkgs
Browse files Browse the repository at this point in the history
Also comment out broken pre-commit meta hook
<NixOS/nixpkgs#270805>.
  • Loading branch information
l0b0 committed Feb 27, 2024
1 parent 228b84a commit 5e1eb87
Show file tree
Hide file tree
Showing 12 changed files with 423 additions and 416 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ repos:
pass_filenames: false
language: system
stages: [commit]

- repo: meta
hooks:
- id: check-useless-excludes
# TODO: Re-enable when https://github.com/NixOS/nixpkgs/issues/270805 is fixed
# - repo: meta
# hooks:
# - id: check-useless-excludes
14 changes: 2 additions & 12 deletions flooding/sentinel1_water_extraction/poetryPackages.nix
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
{
pkgs,
poetry2nix,
python,
}:
pkgs.poetry2nix.mkPoetryPackages {
poetry2nix.mkPoetryPackages {
inherit python;
projectDir = builtins.path {
path = ./.;
name = "sentinel1_water_extraction_packages";
};
overrides = pkgs.poetry2nix.overrides.withDefaults (self: super: {
jupyterlab = super.jupyterlab.overridePythonAttrs (old: {
# TODO: Remove when https://github.com/nix-community/poetry2nix/pull/1173 is in use
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [self.hatchling self.hatch-jupyter-builder];
});
overrides = super.overrides.overridePythonAttrs (old: {
# TODO: Remove when https://github.com/nix-community/poetry2nix/pull/1173 is in use
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [self.setuptools];
});
});
}
5 changes: 4 additions & 1 deletion flooding/sentinel1_water_extraction/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ let
python = import ../../python.nix {
inherit pkgs;
};
poetry2nix = import ../../poetry2nix.nix {
inherit pkgs;
};
poetryPackages = import ./poetryPackages.nix {
inherit pkgs python;
inherit poetry2nix python;
};
in
pkgs.mkShell {
Expand Down
15 changes: 2 additions & 13 deletions flooding/sentinel2_water_extraction/poetryPackages.nix
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
{
pkgs,
poetry2nix,
python,
}:
pkgs.poetry2nix.mkPoetryPackages {
poetry2nix.mkPoetryPackages {
inherit python;
projectDir = builtins.path {
path = ./.;
name = "sentinel2_water_extraction_packages";
};
overrides = pkgs.poetry2nix.overrides.withDefaults (self: super: {
annotated-types = super.annotated-types.overridePythonAttrs (old: {
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [self.hatchling];
});
pydantic = super.pydantic.overridePythonAttrs (old: {
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [self.hatchling self.hatch-fancy-pypi-readme];
});
pydantic-core = super.pydantic-core.override {
preferWheel = true;
};
});
}
5 changes: 4 additions & 1 deletion flooding/sentinel2_water_extraction/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ let
python = import ../../python.nix {
inherit pkgs;
};
poetry2nix = import ../../poetry2nix.nix {
inherit pkgs;
};
poetryPackages = import ./poetryPackages.nix {
inherit pkgs python;
inherit poetry2nix python;
};
in
pkgs.mkShell {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ describe("humanReadableLocalDateTime", function () {
humanReadableLocalDateTime(
"2000-01-01T00:00:00Z",
"en-NZ",
"Pacific/Auckland"
)
"Pacific/Auckland",
),
);
});
it("should support non-New Zealand time zones and locales", function () {
Expand All @@ -25,8 +25,8 @@ describe("humanReadableLocalDateTime", function () {
humanReadableLocalDateTime(
"2000-01-01T00:00:00Z",
"nb-NO",
"Europe/Oslo"
)
"Europe/Oslo",
),
);
});
it("should use defaults for locale and time zone (must run in a Node.js process with `TZ=UTC` and `LC_MESSAGES=C`)", function () {
Expand All @@ -39,13 +39,13 @@ describe("humanReadableLocalDateTime", function () {
}
assertEqual(
"Saturday, January 1, 2000 at 00:00:00",
humanReadableLocalDateTime("2000-01-01T00:00:00Z")
humanReadableLocalDateTime("2000-01-01T00:00:00Z"),
);
});
it("should return 'Invalid Date' for invalid date", function () {
assertEqual(
"Invalid Date",
humanReadableLocalDateTime("not a date/time")
humanReadableLocalDateTime("not a date/time"),
);
});
});
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
14 changes: 11 additions & 3 deletions machine-readable-to-human-readable-date-time/test/mocha.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ body {
}

#mocha {
font: 20px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
font:
20px/1.5 "Helvetica Neue",
Helvetica,
Arial,
sans-serif;
margin: 60px 50px;
}

Expand Down Expand Up @@ -208,7 +212,9 @@ body {
display: block;
float: left;
clear: left;
font: 12px/1.5 monaco, monospace;
font:
12px/1.5 monaco,
monospace;
margin: 5px;
padding: 15px;
border: 1px solid var(--mocha-box-shadow-color);
Expand Down Expand Up @@ -250,7 +256,9 @@ body {
display: block;
float: left;
clear: left;
font: 12px/1.5 monaco, monospace;
font:
12px/1.5 monaco,
monospace;
margin: 5px;
padding: 15px;
border: 1px solid var(--mocha-box-shadow-color);
Expand Down
Loading

0 comments on commit 5e1eb87

Please sign in to comment.