Skip to content

Commit

Permalink
Fix /tmp permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
donn committed Apr 8, 2024
1 parent 56d0027 commit c8d11b5
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions docker/docker.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@ let
"arm64v8"
;
in
dockerTools.buildImage rec {
dockerTools.buildLayeredImage rec {
name = "efabless/openlane";
tag = "current-${docker-arch-name}";

maxLayers = 2;

copyToRoot = buildEnv {
contents = buildEnv {
name = "image-root";
paths = [
# Base OS
Expand All @@ -73,15 +75,13 @@ in
silver-searcher
gdb
lldb

# OpenLane
openlane1
];

postBuild = ''
mkdir -p $out/tmp
mkdir -p $out/etc
mkdir -p $out/usr/bin
cp -r ${openlane1}/bin $out/openlane
ln -s /bin/env $out/usr/bin/env
cat <<HEREDOC > $out/etc/zshrc
Expand All @@ -93,6 +93,11 @@ in
HEREDOC
'';
};

enableFakechroot = true;
fakeRootCommands = ''
chmod 1777 /tmp
'';

created = "now";
config = {
Expand All @@ -104,7 +109,7 @@ in
"LC_CTYPE=C.UTF-8"
"EDITOR=nvim"
"PYTHONPATH=${openlane-env-sitepackages}"
"PATH=${openlane-env-bin}:${openlane1.computed_PATH}:/bin"
"PATH=/openlane:${openlane-env-bin}:${openlane1.computed_PATH}:/bin"
"TMPDIR=/tmp"
];
};
Expand Down

0 comments on commit c8d11b5

Please sign in to comment.