From a67eb5a40cefabad7954eb78533d9830580219cf Mon Sep 17 00:00:00 2001 From: coolneng Date: Tue, 6 Jul 2021 17:20:00 +0200 Subject: [PATCH] Bump nixpkgs revision --- .gitignore | 1 + default.nix | 22 ++++++++++++++++++++++ docker.nix | 11 +++++++++++ nix/sources.json | 6 +++--- 4 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 default.nix create mode 100644 docker.nix diff --git a/.gitignore b/.gitignore index 934e5d5..69edc3a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *.fastq +result diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..e65bb2d --- /dev/null +++ b/default.nix @@ -0,0 +1,22 @@ +{ sources ? import ./nix/sources.nix, pkgs ? import sources.nixpkgs { } }: + +with pkgs; + +let + srcNoTarget = dir: + builtins.filterSource + (path: type: type != "directory" || builtins.baseNameOf path != "target") + dir; + src = srcNoTarget ./.; + +in stdenv.mkDerivation { + name = "locigenesis"; + phases = "installPhase"; + + installPhase = '' + mkdir -p $out/bin + cp -r ${src}/src $out + cp -r ${src}/data/*.rds $out + cp ${src}/generation.sh $out + ''; +} diff --git a/docker.nix b/docker.nix new file mode 100644 index 0000000..8134f63 --- /dev/null +++ b/docker.nix @@ -0,0 +1,11 @@ +{ sources ? import ./nix/sources.nix, pkgs ? import sources.nixpkgs { } }: + +with pkgs; + +let locigenesis = pkgs.callPackage ./default.nix { }; + +in dockerTools.buildImage { + name = "akasroua/locigenesis"; + contents = [ locigenesis ]; + config.Entrypoint = [ "${locigenesis}/bin/generation.sh" ]; +} diff --git a/nix/sources.json b/nix/sources.json index 1db69b6..51d340c 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -17,10 +17,10 @@ "homepage": "", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a565a2165ab6e195d7c105a8416b8f4b4d0349a4", - "sha256": "1x90qm533lh8xh172rqfcj3pwg8imyx650xgr41rqppmm6fli4w1", + "rev": "359e6542e1d41eb18df55c82bdb08bf738fae2cf", + "sha256": "05v28njaas9l26ibc6vy6imvy7grbkli32bmv0n32x6x9cf68gf9", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/a565a2165ab6e195d7c105a8416b8f4b4d0349a4.tar.gz", + "url": "https://github.com/NixOS/nixpkgs/archive/359e6542e1d41eb18df55c82bdb08bf738fae2cf.tar.gz", "url_template": "https://github.com///archive/.tar.gz" } }