Giter Site home page Giter Site logo

nix2aci's People

Contributors

mic92 avatar steveej avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mic92 cgonyeo

nix2aci's Issues

/etc handling is broken

First off, I love this program. We're using it to make ACIs for our production software, and it's effective, simple, and it works. So thanks for making it!

The handling of /etc in mkACI.py is broken. mkACI.py uses cp -aL when copying /etc. Since this follows symlinks, this is broken if /etc from the input derivations contains relative or absolute links outside of /nix/store. For instance, if a derivation contains a /usr/share/whatever directory, and /etc/whatever is symlinked to it, when cp -aL is ran, the files from /usr/share/whatever on the host system will be used instead of the files from the derivation.

I'd be interested in fixing this, but I'm not sure what the best way to do so is, or what the rationale behind this behavior is.

Spaces not escaped properly

When one adds a mount point (and probably other things) that has a space in it, the space isn't properly escaped when passed into acbuild, causing acbuild to throw an error

...
++ acbuild --debug mount add config /var/lib/plexmediaserver/Library/Application Support
mount add: incorrect number of arguments
+ export EXT=0
+ EXT=0
+ /nix/store/6hrcxzwk3padb28i3phnmmz15bjjqaj3-findutils-4.4.2/bin/find .acbuild/ -type d -exec chmod +wr '{}' +
+ acbuild --debug end
Ending the build
+ exit
builder for '/nix/store/83cm1008c7q3f4jgyrjkb4xk7nbbk44q-plex.drv' failed with exit code 1
error: build of '/nix/store/83cm1008c7q3f4jgyrjkb4xk7nbbk44q-plex.drv' failed

The plex.nix file that causes this:

{ mkACI, pkgs, thin ? false, ... } @ args:
let 
  pkg = pkgs.plex;
in

mkACI rec {
  inherit pkgs;
  inherit thin;
  packages = [ pkg ];

  mounts = {
    "config" = "/var/lib/plexmediaserver/Library/Application Support";
    "media" = "/media";
  };

  ports = {
      "https" = [ "tcp" "32400" ];
  };

  exec = "/usr/lib/plexmediaserver/Plex Media Server";

  env = {
      "PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR" = "/var/lib/plexmediaserver/Library/Application Support";
      "PLEX_MEDIA_SERVER_HOME" = "/usr/lib/plexmediaserver";
      "PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS" = "6";
      "PLEX_MEDIA_SERVER_TMPDIR" = "/tmp";
      "LD_LIBRARY_PATH" = "/usr/lib/plexmediaserver";
      "LC_ALL" = "en_US.UTF-8";
      "LANG" = "en_US.UTF-8";
  };
}

Tests needed

Following functionality needs testing

  • Manifest validation
  • Thin ACI
  • Fat ACI
  • Probably more

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.