Skip to content

Commit

Permalink
feat(build): fluidattacks#1202 update nixpkgs
Browse files Browse the repository at this point in the history
- Update nixpkgs to last version

Signed-off-by: Robin Quintero <rohaquinlop301@gmail.com>
  • Loading branch information
rohaquinlop committed Dec 14, 2023
1 parent fc1be2e commit a349dd3
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 28 deletions.
4 changes: 2 additions & 2 deletions docs/src/api/builtins/utilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ m github:fluidattacks/makes@23.07 /utils/makeNodeJsLock \
"${package_json_dir}"
```

- Supported `node_js_version`s are: `14`, `16` and `18`.
- Supported `node_js_version`s are: `18`, `20` and `21`.
- `package_json_dir` is the **absolute path** to the directory that contains
the `package.json` file in your project.
- The `package-lock.json` file will be generated in the same directory that
Expand Down Expand Up @@ -59,7 +59,7 @@ m github:fluidattacks/makes@23.07 /utils/makeRubyLock \
"${sources_yaml}"
```

- Supported `ruby_version`s are: `2.7`, `3.0` and `3.1`.
- Supported `ruby_version`s are: `3.1`, `3.2` and `3.3`.
- `dependencies_yaml` is the **absolute path** to a YAML file
mapping [RubyGems](https://rubygems.org/) gems to version constraints.
Example:
Expand Down
3 changes: 3 additions & 0 deletions makes/docs/runtime/main.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ makeSearchPaths {
(makePythonPypiEnvironment {
name = "docs-runtime-pypi";
sourcesYaml = ./pypi/sources.yaml;
withSetuptools_67_7_2 = true;
withSetuptoolsScm_7_1_0 = true;
withWheel_0_40_0 = true;
})
];
}
10 changes: 5 additions & 5 deletions makes/utils/makeNodeJsLock/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ function main {
)

: && case "${node_js_version}" in
14) npm=__argNode14__/bin/npm ;;
16) npm=__argNode16__/bin/npm ;;
18) npm=__argNode18__/bin/npm ;;
*) critical NodeJs version not supported: "${node_js_version}" ;;
esac \
18) npm=__argNode18__/bin/npm ;;
20) npm=__argNode20__/bin/npm ;;
21) npm=__argNode21__/bin/npm ;;
*) critical NodeJs version not supported: "${node_js_version}" ;;
esac \
&& pushd "${package_json_dir}" \
&& "${npm}" install "${npm_install_args[@]}" \
&& popd || return 1
Expand Down
4 changes: 2 additions & 2 deletions makes/utils/makeNodeJsLock/main.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ makeScript {
entrypoint = ./entrypoint.sh;
name = "make-node-js-lock";
replace = {
__argNode14__ = makeNodeJsVersion "14";
__argNode16__ = makeNodeJsVersion "16";
__argNode18__ = makeNodeJsVersion "18";
__argNode20__ = makeNodeJsVersion "20";
__argNode21__ = makeNodeJsVersion "21";
};
}
8 changes: 4 additions & 4 deletions makes/utils/makeRubyLock/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ function main {

: \
&& case "${ruby_version}" in
2.7) ruby=__argRuby27__ ;;
3.0) ruby=__argRuby30__ ;;
3.1) ruby=__argRuby31__ ;;
3.1) ruby=__argRuby31__/bin/ruby ;;
3.2) ruby=__argRuby32__/bin/ruby ;;
3.3) ruby=__argRuby33__/bin/ruby ;;
*) critical Ruby version not supported: "${ruby_version}" ;;
esac \
&& info "Generating manifest:" \
&& pushd "$(mktemp -d)" \
&& "__argRuby27__/bin/ruby" \
&& "${ruby}" \
"__argParser__" \
"${ruby_version}" \
"${ruby}" \
Expand Down
4 changes: 2 additions & 2 deletions makes/utils/makeRubyLock/main.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ makeScript {
name = "make-ruby-lock";
replace = {
__argParser__ = ./parser.rb;
__argRuby27__ = makeRubyVersion "2.7";
__argRuby30__ = makeRubyVersion "3.0";
__argRuby31__ = makeRubyVersion "3.1";
__argRuby32__ = makeRubyVersion "3.2";
__argRuby33__ = makeRubyVersion "3.3";
};
searchPaths.bin = [
__nixpkgs__.nix
Expand Down
5 changes: 4 additions & 1 deletion src/args/agnostic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
fix' = __unfix__: let x = __unfix__ x // {inherit __unfix__;}; in x;
sources = import ../nix/sources.nix;
args = fix' (self: let
__nixpkgs__ = import sources.nixpkgs {inherit system;};
__nixpkgs__ = import sources.nixpkgs {
inherit system;
config = {allowUnfree = true;};
};
in {
inherit __nixpkgs__;
__nixpkgsSrc__ = sources.nixpkgs;
Expand Down
14 changes: 7 additions & 7 deletions src/args/make-node-js-version/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{__nixpkgs__, ...}: version:
if version == "14"
then __nixpkgs__.nodejs-14_x
else if version == "16"
then __nixpkgs__.nodejs-16_x
else if version == "18"
then __nixpkgs__.nodejs-18_x
else abort "Supported node versions are: 14, 16 and 18"
if version == "18"
then __nixpkgs__.nodejs_18
else if version == "20"
then __nixpkgs__.nodejs_20
else if version == "21"
then __nixpkgs__.nodejs_21
else abort "Supported node versions are: 18, 20 and 21"
4 changes: 2 additions & 2 deletions src/args/make-ruby-version/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{__nixpkgs__, ...}: version:
{
"2.7" = __nixpkgs__.ruby_2_7;
"3.0" = __nixpkgs__.ruby_3_0;
"3.1" = __nixpkgs__.ruby_3_1;
"3.2" = __nixpkgs__.ruby_3_2;
"3.3" = __nixpkgs__.ruby_3_3;
}
.${version}
6 changes: 3 additions & 3 deletions src/nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"homepage": "",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2362848adf8def2866fabbffc50462e929d7fffb",
"sha256": "0wjr874z2y3hc69slaa7d9cw7rj47r1vmc1ml7dw512jld23pn3p",
"rev": "e97b3e4186bcadf0ef1b6be22b8558eab1cdeb5d",
"sha256": "114ggf0xbwq16djg4qql3jljknk9xr8h7dw18ccalwqg9k1cgv0g",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/2362848adf8def2866fabbffc50462e929d7fffb.tar.gz",
"url": "https://github.com/NixOS/nixpkgs/archive/e97b3e4186bcadf0ef1b6be22b8558eab1cdeb5d.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}

0 comments on commit a349dd3

Please sign in to comment.