Browse Source

more nix improvements

master
Lucian Pricop 4 years ago
parent
commit
8a79682218
  1. BIN
      pkgs/nixexprs.tar.xz
  2. 34
      pkgs/sandd-main.nix
  3. 28
      pkgs/sandd.nix
  4. 2
      readme.md

BIN
pkgs/nixexprs.tar.xz

34
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;
}

28
pkgs/sandd.nix

@ -1,28 +1,6 @@
{pkgs ? import <nixpkgs> {
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;
}

2
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
Loading…
Cancel
Save