uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
53
pkgs/servers/web-apps/wallabag/default.nix
Normal file
53
pkgs/servers/web-apps/wallabag/default.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
}:
|
||||
|
||||
# Point the environment variable $WALLABAG_DATA to a data directory
|
||||
# that contains the folder `app` which must be a clone of
|
||||
# wallabag's configuration files with your customized `parameters.yml`.
|
||||
# In practice you need to copy `${pkgs.wallabag}/app` and the
|
||||
# customizzed `parameters.yml` to $WALLABAG_DATA.
|
||||
# These need to be updated every package upgrade.
|
||||
#
|
||||
# After a package upgrade, empty the `var/cache` folder or unexpected
|
||||
# error will occur.
|
||||
|
||||
let
|
||||
pname = "wallabag";
|
||||
version = "2.5.0";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
inherit pname version;
|
||||
|
||||
# GitHub distribution does not include vendored files
|
||||
src = fetchurl {
|
||||
url = "https://static.wallabag.org/releases/wallabag-release-${version}.tar.gz";
|
||||
hash = "sha256-fE/4bVwImQ03wrfdrx6AlulO2xU1M2HIaSOGpTAb02E=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./wallabag-data.patch # exposes $WALLABAG_DATA
|
||||
];
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
cp -R * $out/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "wallabag is a self hostable application for saving web pages";
|
||||
longDescription = ''
|
||||
wallabag is a self-hostable PHP application allowing you to not
|
||||
miss any content anymore. Click, save and read it when you can.
|
||||
It extracts content so that you can read it when you have time.
|
||||
'';
|
||||
license = licenses.mit;
|
||||
homepage = "http://wallabag.org";
|
||||
changelog = "https://github.com/wallabag/wallabag/releases/tag/${version}";
|
||||
maintainers = with maintainers; [ schneefux ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
32
pkgs/servers/web-apps/wallabag/wallabag-data.patch
Normal file
32
pkgs/servers/web-apps/wallabag/wallabag-data.patch
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
diff --git a/app/AppKernel.php b/app/AppKernel.php
|
||||
index 347197e..902b558 100644
|
||||
--- a/app/AppKernel.php
|
||||
+++ b/app/AppKernel.php
|
||||
@@ -69,19 +69,24 @@ class AppKernel extends Kernel
|
||||
return __DIR__;
|
||||
}
|
||||
|
||||
+ public function getProjectDir()
|
||||
+ {
|
||||
+ return getenv('WALLABAG_DATA') ?: dirname(__DIR__);
|
||||
+ }
|
||||
+
|
||||
public function getCacheDir()
|
||||
{
|
||||
- return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment();
|
||||
+ return $this->getProjectDir() . '/var/cache/' . $this->getEnvironment();
|
||||
}
|
||||
|
||||
public function getLogDir()
|
||||
{
|
||||
- return dirname(__DIR__) . '/var/logs';
|
||||
+ return $this->getProjectDir() . '/var/logs';
|
||||
}
|
||||
|
||||
public function registerContainerConfiguration(LoaderInterface $loader)
|
||||
{
|
||||
- $loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml');
|
||||
+ $loader->load($this->getProjectDir() . '/app/config/config_' . $this->getEnvironment() . '.yml');
|
||||
|
||||
$loader->load(function ($container) {
|
||||
if ($container->getParameter('use_webpack_dev_server')) {
|
||||
Loading…
Add table
Add a link
Reference in a new issue