Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hacking instructions don't work #1043

Open
DamienCassou opened this issue Aug 28, 2016 · 17 comments
Open

Hacking instructions don't work #1043

DamienCassou opened this issue Aug 28, 2016 · 17 comments
Assignees
Labels

Comments

@DamienCassou
Copy link

In http://nixos.org/nix/manual/#chap-hacking, the instructions to start working on the project don't work for me (I'm on NixOS unstable).

[projects/nix]$ echo $SHLVL 
2

[projects/nix]$ ./dev-shell 

[projects/nix]$ echo $SHLVL 
3

[projects/nix]$ ./bootstrap.sh 
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force 
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /nix/store/h099siq2ikphfccwafydzr467vkc3jq7-autoconf-2.69/bin/autoconf --force
autoreconf: running: /nix/store/h099siq2ikphfccwafydzr467vkc3jq7-autoconf-2.69/bin/autoheader --force
autoreconf: configure.ac: not using Automake
autoreconf: Leaving directory `.'

[projects/nix]$ configurePhase
configurePhase: command not found
@domenkozar
Copy link
Member

cc @shlevy

@shlevy
Copy link
Member

shlevy commented Aug 28, 2016

This works fine for me, against NixOS/nixpkgs@c5cbda2 (release-16.03) and NixOS/nixpkgs@ed0eb59 (master).

@DamienCassou
Copy link
Author

@shlevy can it be related to nix-community/emacs2nix#23 ?

@shlevy
Copy link
Member

shlevy commented Aug 29, 2016

No idea, sorry

@danbst
Copy link
Contributor

danbst commented Sep 1, 2016

[projects/nix]$ echo $SHLVL
2

Can you reproduce this without extra shell layer?

Also, your prompt text didn't change, but I have this

danbst@jolly ~/nix$ ./dev-shell

[nix-shell:~/nix]$ 

Maybe you have some magic in .bashrc?

@DamienCassou
Copy link
Author

I removed by ~/.bashrc. The gnome-terminal seems to always start at level 2, no idea why. If I switch to a tty, I have a level of 1 but the problem persists. Also, the prompt doesn't change.

@shlevy
Copy link
Member

shlevy commented Sep 2, 2016

@DamienCassou Do you have a bash_profile? Can you share your configuration.nix? I suspect this is some kind of weird interaction with your shell configuration but it's hard to tell what it might be

@DamienCassou
Copy link
Author

@shlevy I don't have any ~/.bash_profile. My configuration.nix is at https://gist.github.com/anonymous/8ac0a1e8b4b1f538e2e911674db92b2f.

@shlevy
Copy link
Member

shlevy commented Sep 2, 2016

@DamienCassou Can you paste the output printed when you run bash -x (ideally from a vty, just to reduce confounders)

@DamienCassou
Copy link
Author

@shlevy what do you mean by vty? How can I copy/paste the output of bash -x from a tty? I tried redirections, but this didn't work. When done from gnome-terminal, the output contains many many things that are not printed from a tty.

@shlevy
Copy link
Member

shlevy commented Sep 2, 2016

Can you try in screen/tmux with a suitable scrollback? Again otherwise in a tty.

@DamienCassou
Copy link
Author

@shlevy I found something interesting. ./dev-shell starts to work (i.e., the prompt is changed to nix-shell:[...]) as soon as I turn program.bash.enableCompletion off. If I turn it back on, it fails again. I reproduced that many times.

Here is the output of bash -x from gnome-terminal with bash completion off and removed ~/.bashrc.

$ bash -x
+ '[' -n '' -o -n '' ']'
+ __ETC_BASHRC_SOURCED=1
+ '[' -z 1 ']'
+ '[' -n '\s-\v\$ ' ']'
+ shopt -s checkwinsize
+ set +h
+ '[' xterm-256color '!=' dumb -o -n '' ']'
+ PROMPT_COLOR='1;31m'
+ let 1000
+ PROMPT_COLOR='1;32m'
+ PS1='\n\[\033[1;32m\][\u@\h:\w]\$\[\033[0m\] '
+ test xterm-256color = xterm
+ alias 'l=ls -alh'
+ alias 'll=ls -l'
+ alias 'ls=ls --color=tty'
+ test -f /etc/bashrc.local

@shlevy
Copy link
Member

shlevy commented Sep 2, 2016

Hmm, I have enableCompletion too. What packages have anything in $profile/etc/bash_completion.d and $profile/share/bash-completion/completions, where $profile=/run/current-system or ~/.nix-profile?

@hedning
Copy link

hedning commented Sep 6, 2016

Sounds exactly like #976, I'm guessing nix-shell -A etc. doesn't work either if you have completion on? #1034 should probably fix it.

@DamienCassou
Copy link
Author

@shlevy nothing in /run/current-system. In ~/.nix-profile: dconf, subversion, git, password-store, backintime-common, bash-completion.

@hedning how can I apply this patch on top of NixOS please?

@stale
Copy link

stale bot commented Feb 15, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Feb 15, 2021
@stale
Copy link

stale bot commented May 2, 2022

I closed this issue due to inactivity. → More info

@stale stale bot closed this as completed May 2, 2022
@thufschmitt thufschmitt reopened this Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants