Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
redox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vector1dev -
redox
Commits
70775ce5
Commit
70775ce5
authored
1 year ago
by
vector1dev -
Browse files
Options
Downloads
Patches
Plain Diff
nix: basic flake for building Redox with Nix
parent
1f49ccae
No related branches found
No related tags found
No related merge requests found
Pipeline
#13887
failed
1 year ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
flake.lock
+96
-0
96 additions, 0 deletions
flake.lock
flake.nix
+83
-0
83 additions, 0 deletions
flake.nix
mk/depends.mk
+4
-0
4 additions, 0 deletions
mk/depends.mk
with
183 additions
and
0 deletions
flake.lock
0 → 100644
+
96
−
0
View file @
70775ce5
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1704420045,
"narHash": "sha256-C36QmoJd5tdQ5R9MC1jM7fBkZW9zBUqbUCsgwS6j4QU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c1be43e8e837b8dbee2b3665a007e761680f0c3d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1681358109,
"narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "96ba1c52e54e74c3197f4d43026b3f3d92e83ff9",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1704593904,
"narHash": "sha256-nDoXZDTRdgF3b4n3m011y99nYFewvOl9UpzFvP8Rb3c=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "c36fd70a99decfa6e110c86f296a97613034a680",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}
This diff is collapsed.
Click to expand it.
flake.nix
0 → 100644
+
83
−
0
View file @
70775ce5
{
description
=
"Redox"
;
inputs
=
{
nixpkgs
.
url
=
"github:NixOS/nixpkgs/nixos-23.11"
;
rust-overlay
.
url
=
"github:oxalica/rust-overlay"
;
};
outputs
=
inputs
@
{
nixpkgs
,
rust-overlay
,
...
}:
let
systems
=
[
"x86_64-linux"
"aarch64-linux"
];
forAllSystems
=
nixpkgs
.
lib
.
genAttrs
systems
;
nixpkgsFor
=
system
:
import
nixpkgs
{
inherit
system
;
overlays
=
[
(
import
rust-overlay
)
];
};
in
{
devShells
=
forAllSystems
(
system
:
let
pkgs
=
nixpkgsFor
system
;
in
rec
{
default
=
redox
;
redox
=
pkgs
.
mkShell
{
NIX_SHELL_BUILD
=
"1"
;
shellHook
=
''''
;
buildInputs
=
with
pkgs
;
[
cmake
fuse
gperf
perl
perl538Packages
.
HTMLParser
perl538Packages
.
Po4a
nasm
wget
texinfo
bison
flex
autoconf
automake
curl
file
gnupatch
gnumake
scons
waf
expat
gmp
libtool
libpng
libjpeg
SDL
m4
pkgconf
syslinux
meson
(
python3
.
withPackages
(
ps
:
with
ps
;
[
mako
]))
xdg-utils
zip
unzip
doxygen
lua
ant
protobuf
llvmPackages_17
.
clang
llvmPackages_17
.
llvm
qemu_kvm
(
rust-bin
.
fromRustupToolchainFile
./rust-toolchain.toml
)
];
};
});
};
}
This diff is collapsed.
Click to expand it.
mk/depends.mk
+
4
−
0
View file @
70775ce5
# Dependencies
# Don't check for Rust/Cargo if you will be using Nix
ifneq
($(NIX_SHELL_BUILD),1)
# Don't check for Rust/Cargo if you will be using Podman
ifneq
($(PODMAN_BUILD),1)
...
...
@@ -26,3 +29,4 @@ $(error just $(JUST_VERSION) not found, run "cargo install --force --version $(J
endif
endif
endif
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment