Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added nix #8487

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -6227,6 +6227,17 @@
"version: \"?(?<currentValue>.*?)\"?\\n"
]
},
{
"customType": "regex",
"datasourceTemplate": "github-tags",
"depNameTemplate": "NixOS/nix",
"fileMatch": [
"^tools/nix/manifest.yaml$"
],
"matchStrings": [
"version: \"?(?<currentValue>.*?)\"?\\n"
]
},
{
"customType": "regex",
"datasourceTemplate": "github-releases",
Expand Down
33 changes: 33 additions & 0 deletions tools/nix/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#syntax=docker/dockerfile:1.11.1@sha256:10c699f1b6c8bdc8f6b4ce8974855dd8542f1768c26eb240237b8f1c9c6c9976

FROM registry.gitlab.com/uniget-org/images/ubuntu:24.04 AS prepare
COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
/etc/profile.d/ \
/etc/profile.d/
SHELL [ "bash", "-clo", "errexit" ]
ARG name
ARG version
RUN --mount=type=cache,target=/var/cache/uniget/download <<EOF
url="https://releases.nixos.org/nix/nix-${version}/nix-${version}-${arch}-linux.tar.xz"
filename="$( basename "${url}" )"

check-download "${url}"
curl --silent --show-error --location --fail --output "${uniget_cache_download}/${filename}" \
"${url}"

tar --file="${uniget_cache_download}/${filename}" --list
tar --file="${uniget_cache_download}/${filename}" --extract --xz --directory="/tmp/" --no-same-owner
EOF
RUN <<EOF
"/tmp/nix-${version}-${arch}-linux/install-multi-user"
mv /nix/ "${prefix}/"
NIX_PATH="$( find "${prefix}/nix/store/" -type f -executable -name nix )"
ln --symbolic --relative --force "${NIX_PATH}" "${prefix}/bin/nix"
EOF

# completion
#RUN <<EOF
#"${prefix}/bin/foo" completion bash >"${prefix}/share/bash-completion/completions/foo"
#"${prefix}/bin/foo" completion fish >"${prefix}/share/fish/vendor_completions.d/foo.fish"
#"${prefix}/bin/foo" completion zsh >"${prefix}/share/zsh/vendor-completions/_foo"
#EOF
29 changes: 29 additions & 0 deletions tools/nix/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# yaml-language-server: $schema=https://tools.uniget.dev/schema.yaml
$schema: https://tools.uniget.dev/schema.yaml
name: nix
license:
name: LGPL-2.1
link: https://github.com/NixOS/nix/blob/master/COPYING
version: "2.25.2"
check: ""
platforms:
- linux/amd64
- linux/arm64
tags:
- org/nixos
- category/development
- lang/c
- type/cli
homepage: https://nixos.org/
repository: https://github.com/NixOS/nix
description: The purely functional package manager
messages:
internals: |
- This package must be installed to /
- Create a group called `nixbld`: groupadd nixbld
- Add user allowed to manage packages: usermod -aG nixbld $(whoami)
- See https://nix.dev/manual/nix/2.18/installation/multi-user
renovate:
datasource: github-tags
package: NixOS/nix
priority: low
Loading