diff --git a/pkgs/nixexprs.tar.xz b/pkgs/nixexprs.tar.xz index 7eb4b6d..8499078 100644 Binary files a/pkgs/nixexprs.tar.xz and b/pkgs/nixexprs.tar.xz differ diff --git a/pkgs/sandd-main.nix b/pkgs/sandd-main.nix new file mode 100644 index 0000000..9d5a7d5 --- /dev/null +++ b/pkgs/sandd-main.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchGit, sbcl, unzip, curl, git, openssl, php, phpPackages, nodejs}: +let + name = "search-and-displace"; + gitStore = builtins.fetchGit { + url = "https://github.com/searchanddisplace/searchanddisplace.git"; + #url = "https://github.com/newroco/rocket_integration.git"; + ref = "master"; + }; + inherit (phpPackages) composer; + buildPackage = { name, src }: + stdenv.mkDerivation { + inherit name src; + buildInputs = [ curl git openssl php composer nodejs ]; + buildCommand = '' + #cd $src + #composer update + #composer install + #npm install + # cp .env.example .env + mkdir -p $out + cp -R $src/* $out + mv * $out + # Remove unwanted files - that is impossible with, nix, give up... + #rm -f $out/*.nix + #rm -R $out/pkgs + # Remove stuff not needed on production - composer.lock, composer.json, etc, etc - that is impossible with, nix, give up... + ''; + }; +in +buildPackage { + inherit name; + #src = ./.; + src = gitStore; +} diff --git a/pkgs/sandd.nix b/pkgs/sandd.nix index b774970..2771d0a 100644 --- a/pkgs/sandd.nix +++ b/pkgs/sandd.nix @@ -1,28 +1,6 @@ -{ pkgs ? import { +{pkgs ? import { inherit system; - }, system ? builtins.currentSystem -}: -let - name = "search-and-displace"; - inherit (pkgs) stdenv git curl php phpPackages; - inherit (phpPackages) composer; - gitStore = builtins.fetchGit { - url = "https://github.com/searchanddisplace/searchanddisplace.git"; - ref = "master"; - }; - buildPackage = { name, src }: - stdenv.mkDerivation { - inherit name src; - buildInputs = [ ]; - buildCommand = '' - composer install - npm install - cp .env.example .env - # Remove stuff not needed on production - composer.loc, .json, etc, etc - ''; - }; -in -buildPackage { - inherit name; - src = gitStore; -} + }, system ? builtins.currentSystem}: +import ./sandd-main.nix { + inherit (pkgs) stdenv fetchGit sbcl unzip curl git openssl php phpPackages nodejs; +} \ No newline at end of file diff --git a/readme.md b/readme.md index ee2e324..d9335cb 100644 --- a/readme.md +++ b/readme.md @@ -20,7 +20,7 @@ nix-channel --update You can now install search-and-displace: ```bash -nix-env -iA search-and-displace +nix-env -i search-and-displace ``` ## :roller_coaster: Usage