Fix packages: use lib instead of stdenv.lib, fix hello-world source
This commit is contained in:
@@ -1,22 +1,22 @@
|
||||
{ stdenv }:
|
||||
{ lib, stdenv }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "hello-world";
|
||||
version = "1.0.0";
|
||||
|
||||
src = builtins.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/tools/hello/hello.c";
|
||||
sha256 = "1p9sc9h1b6k7bk25n5g0w9gwy6fxlkchr5hpmxczg4bvp6jv93q6";
|
||||
};
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp $src $out/bin/hello-world
|
||||
cat > $out/bin/hello-world <<'SCRIPT'
|
||||
#!/bin/sh
|
||||
echo "Hello, world!"
|
||||
SCRIPT
|
||||
chmod +x $out/bin/hello-world
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A tiny hello‑world program used as an example package";
|
||||
meta = with lib; {
|
||||
description = "A tiny hello-world program used as an example package";
|
||||
license = licenses.bsd2;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
{ python3Packages }:
|
||||
{ lib, python3Packages }:
|
||||
|
||||
python3Packages.buildPythonPackage rec {
|
||||
pname = "xonsh";
|
||||
@@ -21,9 +21,9 @@ python3Packages.buildPythonPackage rec {
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
meta = with lib; {
|
||||
description = "Python-powered shell that combines Python with shell features";
|
||||
homepage = "https://xon.sh";
|
||||
license = python3Packages.setuptools.meta.bsd3 or python3Packages.setuptools.meta.license;
|
||||
license = licenses.bsd3;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user