Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PrivateStorageio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PrivateStorage
PrivateStorageio
Commits
42111721
Commit
42111721
authored
3 years ago
by
Tom Prince
Browse files
Options
Downloads
Patches
Plain Diff
Use `tools/default.nix` for tools.
parent
dbd18ac5
No related branches found
Branches containing commit
No related tags found
2 merge requests
!180
merge develop into production
,
!165
Add a script to update nixos version, and run it.
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/source/dev/README.rst
+1
-1
1 addition, 1 deletion
docs/source/dev/README.rst
shell.nix
+2
-13
2 additions, 13 deletions
shell.nix
tools/default.nix
+26
-0
26 additions, 0 deletions
tools/default.nix
with
29 additions
and
14 deletions
docs/source/dev/README.rst
+
1
−
1
View file @
42111721
...
...
@@ -49,7 +49,7 @@ To update the version of NixOS we deploy with, run:
.. code: shell
nix-shell --command '
tools/
update-nixpkgs'
nix-shell --command 'update-nixpkgs'
That will update ``nixpkgs-2015.json`` to the latest release on the nixos-21.05 channel.
...
...
This diff is collapsed.
Click to expand it.
shell.nix
+
2
−
13
View file @
42111721
...
...
@@ -3,25 +3,14 @@ let
in
{
pkgs
?
release2105
,
lib
?
pkgs
.
lib
,
python
?
pkgs
.
python3
}:
let
# This is a python envionment that has the dependencies
# for the development python scripts we use, and the
# helper library.
python-env
=
python
.
buildEnv
.
override
{
extraLibs
=
[
python
.
pkgs
.
httpx
];
# Add `.pth` file pointing at the directory containg our helper library.
# This will get added to `sys.path` by `site.py`.
# See https://docs.python.org/3/library/site.html
postBuild
=
''
echo
${
lib
.
escapeShellArg
./tools/pylib
}
> $out/
${
lib
.
escapeShellArg
python
.
sitePackages
}
/tools.pth
''
;
};
tools
=
pkgs
.
callPackage
./tools
{};
in
pkgs
.
mkShell
{
shellHook
=
''
export NIX_PATH="nixpkgs=
${
pkgs
.
path
}
";
''
;
buildInputs
=
[
python-env
tools
pkgs
.
morph
pkgs
.
jp
];
...
...
This diff is collapsed.
Click to expand it.
tools/default.nix
0 → 100644
+
26
−
0
View file @
42111721
{
pkgs
,
lib
,
makeWrapper
,
...
}:
let
python
=
pkgs
.
python3
;
# This is a python envionment that has the dependencies
# for the development python scripts we use, and the
# helper library.
python-env
=
python
.
buildEnv
.
override
{
extraLibs
=
[
python
.
pkgs
.
httpx
];
# Add `.pth` file pointing at the directory containg our helper library.
# This will get added to `sys.path` by `site.py`.
# See https://docs.python.org/3/library/site.html
postBuild
=
''
echo
${
lib
.
escapeShellArg
./pylib
}
> $out/
${
lib
.
escapeShellArg
python
.
sitePackages
}
/tools.pth
''
;
};
in
# This derivation creates a package that wraps our tools to setup an environment
# with there dependencies available.
pkgs
.
runCommand
"ps_tools"
{
nativeBuildInputs
=
[
makeWrapper
];
}
''
mkdir -p $out/bin
# makeWrapper <executable> <wrapperfile> <args>
# See https://nixos.org/manual/nixpkgs/stable/#fun-makeWrapper
makeWrapper
${
python-env
}
/bin/python $out/bin/update-nixpkgs --add-flags
${
toString
./update-nixpkgs
}
''
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment