Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nix
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
Nora Puchreiner
Nix
Commits
16c9935f
Commit
16c9935f
authored
9 years ago
by
Eelco Dolstra
Browse files
Options
Downloads
Patches
Plain Diff
Fix fetchurl of executable file
Pointed out by @cstrahan, thanks!
parent
19eddecc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
corepkgs/fetchurl.nix
+1
-1
1 addition, 1 deletion
corepkgs/fetchurl.nix
src/libstore/builtins.cc
+1
-1
1 addition, 1 deletion
src/libstore/builtins.cc
with
2 additions
and
2 deletions
corepkgs/fetchurl.nix
+
1
−
1
View file @
16c9935f
...
@@ -16,7 +16,7 @@ derivation {
...
@@ -16,7 +16,7 @@ derivation {
if
sha256
!=
""
then
sha256
else
if
sha1
!=
""
then
sha1
else
md5
;
if
sha256
!=
""
then
sha256
else
if
sha1
!=
""
then
sha1
else
md5
;
outputHashMode
=
if
executable
then
"recursive"
else
"flat"
;
outputHashMode
=
if
executable
then
"recursive"
else
"flat"
;
inherit
system
url
;
inherit
system
url
executable
;
# No need to double the amount of network traffic
# No need to double the amount of network traffic
preferLocalBuild
=
true
;
preferLocalBuild
=
true
;
...
...
This diff is collapsed.
Click to expand it.
src/libstore/builtins.cc
+
1
−
1
View file @
16c9935f
...
@@ -14,7 +14,7 @@ void builtinFetchurl(const BasicDerivation & drv)
...
@@ -14,7 +14,7 @@ void builtinFetchurl(const BasicDerivation & drv)
if
(
out
==
drv
.
env
.
end
())
throw
Error
(
"attribute ‘url’ missing"
);
if
(
out
==
drv
.
env
.
end
())
throw
Error
(
"attribute ‘url’ missing"
);
writeFile
(
out
->
second
,
data
.
data
);
writeFile
(
out
->
second
,
data
.
data
);
auto
executable
=
drv
.
env
.
find
(
"
out
"
);
auto
executable
=
drv
.
env
.
find
(
"
executable
"
);
if
(
executable
!=
drv
.
env
.
end
()
&&
executable
->
second
==
"1"
)
{
if
(
executable
!=
drv
.
env
.
end
()
&&
executable
->
second
==
"1"
)
{
if
(
chmod
(
out
->
second
.
c_str
(),
0755
)
==
-
1
)
if
(
chmod
(
out
->
second
.
c_str
(),
0755
)
==
-
1
)
throw
SysError
(
format
(
"making ‘%1%’ executable"
)
%
out
->
second
);
throw
SysError
(
format
(
"making ‘%1%’ executable"
)
%
out
->
second
);
...
...
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