-
Notifications
You must be signed in to change notification settings - Fork 54
Update compiler.md #67
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
base: docs
Are you sure you want to change the base?
Conversation
Add a tip for some cases when Nix doesn't allow you to write information in /etc
Could you please provide more detail about this issue? I'm unable to repro this error. |
Is there something I need to change in my default.nix? {
system ? builtins.currentSystem,
pkgs ? import <nixpkgs> { system = system; }
}:
pkgs.buildEnv {
name = "hydrojudge-rootfs";
paths = with pkgs; [
coreutils bash diffutils nix zip unzip gcc
(python3.withPackages (ps: with ps; [ numpy scipy ]))
];
ignoreCollisions = true;
pathsToLink = [ "/" ];
postBuild = ''
mkdir -p $out/buildInfo
echo 'root:x:0:0:root:/root:/bin/bash' >$out/etc/passwd
date > $out/buildInfo/timestamp
'';
} |
simply use you can also create the following {
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
{
packages = let
callPackage = file: args: import file (args // { pkgs = nixpkgs.legacyPackages.${system}; system = system; });
in {
judge = callPackage ./judge.nix {};
};
}
);
} |
Thanks. I will try it the next day on our college's server. Btw, will this pr be merged? Or we just leave this pr open for further potential questions (that should be the issue) |
Currently we would suggest users to use nix flake instead of the traditional way if possible. |
Any update for this? wonder if it works properly. |
Sorry for the late response. I still got errors, largely because I am not familiar with Flake😥. Nvm, I can still build a custom environment by manually inserting passwords. |
Add a tip for some cases when Nix doesn't allow you to write information in /etc.